Skip to content

Commit 4072d63

Browse files
authored
[client] Prepare client python migration and read only (#1031)
1 parent 2bfe8b7 commit 4072d63

File tree

2 files changed

+2
-129
lines changed

2 files changed

+2
-129
lines changed

README.md

Lines changed: 2 additions & 103 deletions
Original file line numberDiff line numberDiff line change
@@ -1,107 +1,6 @@
1-
# OpenCTI client for Python
1+
# This repository has been archived
22

3-
[![Website](https://img.shields.io/badge/website-opencti.io-blue.svg)](https://opencti.io)
4-
[![CircleCI](https://circleci.com/gh/OpenCTI-Platform/client-python.svg?style=shield)](https://circleci.com/gh/OpenCTI-Platform/client-python/tree/master)
5-
[![readthedocs](https://readthedocs.org/projects/opencti-client-for-python/badge/?style=flat)](https://opencti-client-for-python.readthedocs.io/en/latest/)
6-
[![GitHub release](https://img.shields.io/github/release/OpenCTI-Platform/client-python.svg)](https://github.com/OpenCTI-Platform/client-python/releases/latest)
7-
[![Number of PyPI downloads](https://img.shields.io/pypi/dm/pycti.svg)](https://pypi.python.org/pypi/pycti/)
8-
[![Slack Status](https://img.shields.io/badge/slack-3K%2B%20members-4A154B)](https://community.filigran.io)
9-
10-
The official OpenCTI Python client helps developers to use the OpenCTI API by providing easy to use methods and utils.
11-
This client is also used by some OpenCTI components.
12-
13-
## Install
14-
15-
To install the latest Python client library, please use `pip`:
16-
17-
```bash
18-
$ pip3 install pycti
19-
```
20-
21-
## Local development
22-
23-
```bash
24-
# Fork the current repository, then clone your fork
25-
$ git clone https://github.com/YOUR-USERNAME/client-python
26-
$ cd client-python
27-
$ git remote add upstream https://github.com/OpenCTI-Platform/client-python.git
28-
# Create a branch for your feature/fix
29-
$ git checkout -b [branch-name]
30-
# Create a virtualenv
31-
$ python3 -m venv .venv
32-
$ source .venv/bin/activate
33-
# Install the client-python and dependencies for the development and the documentation
34-
$ python3 -m pip install -e .[dev,doc]
35-
# Set up the git hook scripts
36-
$ pre-commit install
37-
# Create your feature/fix
38-
# Create tests for your changes
39-
$ pytest
40-
# Push you feature/fix on Github
41-
$ git add [file(s)]
42-
$ git commit -m "[descriptive message]"
43-
$ git push origin [branch-name]
44-
# Open a pull request
45-
```
46-
47-
### Install the package locally
48-
49-
```bash
50-
$ pip install -e .
51-
```
52-
53-
## Documentation
54-
55-
### Client usage
56-
57-
To learn about how to use the OpenCTI Python client and read some examples and cases, refer to [the client documentation](https://opencti-client-for-python.readthedocs.io/en/latest/client_usage/getting_started.html).
58-
59-
### API reference
60-
61-
To learn about the methods available for executing queries and retrieving their answers, refer to [the client API Reference](https://opencti-client-for-python.readthedocs.io/en/latest/pycti/pycti.html).
62-
63-
## Tests
64-
65-
### Install dependencies
66-
67-
```bash
68-
$ pip install -r ./test-requirements.txt
69-
```
70-
71-
[pytest](https://docs.pytest.org/en/7.2.x/) is used to launch the tests.
72-
73-
### Launch tests
74-
75-
#### Prerequisite
76-
77-
Your OpenCTI API should be running.
78-
Your conftest.py should be configured with your API url, your token, and if applicable, your mTLS cert/key.
79-
80-
#### Launching
81-
82-
Unit tests
83-
```bash
84-
$ pytest ./tests/01-unit/
85-
```
86-
87-
Integration testing
88-
```bash
89-
$ pytest ./tests/02-integration/
90-
```
91-
92-
Example testing:
93-
94-
> OpenCTI must be running
95-
96-
```bash
97-
cd examples
98-
# Configure with you local instance of OpenCTI
99-
export OPENCTI_API_URL="http://localhost:4000"
100-
export OPENCTI_API_TOKEN="xxxxxxxxxxxxxxxxxxxxxx"
101-
102-
#Run one example file
103-
python get_indicators_of_malware.py
104-
```
3+
You can find all client-python code in the `client-python` directory of [OpenCTI repository](https://github.com/OpenCTI-Platform/opencti)
1054

1065
## About
1076

renovate.json

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)