pycti


Namepycti JSON
Version 6.4.10 PyPI version JSON
download
home_pagehttps://github.com/OpenCTI-Platform/client-python
SummaryPython API client for OpenCTI.
upload_time2025-01-29 16:05:31
maintainerFiligran
docs_urlNone
authorFiligran
requires_python>=3.7
licenseApache
keywords
VCS
bugtrack_url
requirements datefinder pika python-magic python-magic-bin python_json_logger PyYAML pydantic requests setuptools cachetools prometheus-client opentelemetry-api opentelemetry-sdk deprecation filigran-sseclient stix2
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # OpenCTI client for Python

[![Website](https://img.shields.io/badge/website-opencti.io-blue.svg)](https://opencti.io)
[![CircleCI](https://circleci.com/gh/OpenCTI-Platform/client-python.svg?style=shield)](https://circleci.com/gh/OpenCTI-Platform/client-python/tree/master)
[![readthedocs](https://readthedocs.org/projects/opencti-client-for-python/badge/?style=flat)](https://opencti-client-for-python.readthedocs.io/en/latest/)
[![GitHub release](https://img.shields.io/github/release/OpenCTI-Platform/client-python.svg)](https://github.com/OpenCTI-Platform/client-python/releases/latest)
[![Number of PyPI downloads](https://img.shields.io/pypi/dm/pycti.svg)](https://pypi.python.org/pypi/pycti/)
[![Slack Status](https://img.shields.io/badge/slack-3K%2B%20members-4A154B)](https://community.filigran.io)

The official OpenCTI Python client helps developers to use the OpenCTI API by providing easy to use methods and utils.
This client is also used by some OpenCTI components.

## Install

To install the latest Python client library, please use `pip`:

```bash
$ pip3 install pycti
```

## Local development

```bash
# Fork the current repository, then clone your fork
$ git clone https://github.com/YOUR-USERNAME/client-python
$ cd client-python
$ git remote add upstream https://github.com/OpenCTI-Platform/client-python.git
# Create a branch for your feature/fix
$ git checkout -b [branch-name]
# Create a virtualenv
$ python3 -m venv .venv
$ source .venv/bin/activate
# Install the client-python and dependencies for the development and the documentation
$ python3 -m pip install -e .[dev,doc]
# Set up the git hook scripts
$ pre-commit install
# Create your feature/fix
# Create tests for your changes
$ pytest
# Push you feature/fix on Github
$ git add [file(s)]
$ git commit -m "[descriptive message]"
$ git push origin [branch-name]
# Open a pull request
```

### Install the package locally

```bash
$ pip install -e .
```

## Documentation

### Client usage

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).

### API reference

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).

## Tests

### Install dependencies

```bash
$ pip install -r ./test-requirements.txt
```

[pytest](https://docs.pytest.org/en/7.2.x/) is used to launch the tests.

### Launch tests

#### Prerequisite

Your OpenCTI API should be running.
Your conftest.py should be configured with your API url, your token, and if applicable, your mTLS cert/key.

#### Launching

Unit tests
```bash
$ pytest ./tests/01-unit/
```

Integration testing
```bash
$ pytest ./tests/02-integration/
```

## About

OpenCTI is a product designed and developed by the company [Filigran](https://filigran.io).

<a href="https://filigran.io" alt="Filigran"><img src="https://github.com/OpenCTI-Platform/opencti/raw/master/.github/img/logo_filigran.png" width="300" /></a>

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/OpenCTI-Platform/client-python",
    "name": "pycti",
    "maintainer": "Filigran",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": null,
    "keywords": null,
    "author": "Filigran",
    "author_email": "contact@filigran.io",
    "download_url": "https://files.pythonhosted.org/packages/29/42/cabcb7c92a1d483415755e9dd6f894486febc7cee239f50f0d76b242522b/pycti-6.4.10.tar.gz",
    "platform": null,
    "description": "# OpenCTI client for Python\n\n[![Website](https://img.shields.io/badge/website-opencti.io-blue.svg)](https://opencti.io)\n[![CircleCI](https://circleci.com/gh/OpenCTI-Platform/client-python.svg?style=shield)](https://circleci.com/gh/OpenCTI-Platform/client-python/tree/master)\n[![readthedocs](https://readthedocs.org/projects/opencti-client-for-python/badge/?style=flat)](https://opencti-client-for-python.readthedocs.io/en/latest/)\n[![GitHub release](https://img.shields.io/github/release/OpenCTI-Platform/client-python.svg)](https://github.com/OpenCTI-Platform/client-python/releases/latest)\n[![Number of PyPI downloads](https://img.shields.io/pypi/dm/pycti.svg)](https://pypi.python.org/pypi/pycti/)\n[![Slack Status](https://img.shields.io/badge/slack-3K%2B%20members-4A154B)](https://community.filigran.io)\n\nThe official OpenCTI Python client helps developers to use the OpenCTI API by providing easy to use methods and utils.\nThis client is also used by some OpenCTI components.\n\n## Install\n\nTo install the latest Python client library, please use `pip`:\n\n```bash\n$ pip3 install pycti\n```\n\n## Local development\n\n```bash\n# Fork the current repository, then clone your fork\n$ git clone https://github.com/YOUR-USERNAME/client-python\n$ cd client-python\n$ git remote add upstream https://github.com/OpenCTI-Platform/client-python.git\n# Create a branch for your feature/fix\n$ git checkout -b [branch-name]\n# Create a virtualenv\n$ python3 -m venv .venv\n$ source .venv/bin/activate\n# Install the client-python and dependencies for the development and the documentation\n$ python3 -m pip install -e .[dev,doc]\n# Set up the git hook scripts\n$ pre-commit install\n# Create your feature/fix\n# Create tests for your changes\n$ pytest\n# Push you feature/fix on Github\n$ git add [file(s)]\n$ git commit -m \"[descriptive message]\"\n$ git push origin [branch-name]\n# Open a pull request\n```\n\n### Install the package locally\n\n```bash\n$ pip install -e .\n```\n\n## Documentation\n\n### Client usage\n\nTo 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).\n\n### API reference\n\nTo 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).\n\n## Tests\n\n### Install dependencies\n\n```bash\n$ pip install -r ./test-requirements.txt\n```\n\n[pytest](https://docs.pytest.org/en/7.2.x/) is used to launch the tests.\n\n### Launch tests\n\n#### Prerequisite\n\nYour OpenCTI API should be running.\nYour conftest.py should be configured with your API url, your token, and if applicable, your mTLS cert/key.\n\n#### Launching\n\nUnit tests\n```bash\n$ pytest ./tests/01-unit/\n```\n\nIntegration testing\n```bash\n$ pytest ./tests/02-integration/\n```\n\n## About\n\nOpenCTI is a product designed and developed by the company [Filigran](https://filigran.io).\n\n<a href=\"https://filigran.io\" alt=\"Filigran\"><img src=\"https://github.com/OpenCTI-Platform/opencti/raw/master/.github/img/logo_filigran.png\" width=\"300\" /></a>\n",
    "bugtrack_url": null,
    "license": "Apache",
    "summary": "Python API client for OpenCTI.",
    "version": "6.4.10",
    "project_urls": {
        "Homepage": "https://github.com/OpenCTI-Platform/client-python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "b971f6201dfa44ac5305f026a6c7831fa26d789251dcfa405cca09accd6b0469",
                "md5": "affd8fe92205056c5ec19a15e1e3bc9e",
                "sha256": "0935e5a881ff4b15809e18d8335a762e03c6fd587f0069fa5325460f7ab262ef"
            },
            "downloads": -1,
            "filename": "pycti-6.4.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "affd8fe92205056c5ec19a15e1e3bc9e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 235820,
            "upload_time": "2025-01-29T16:05:28",
            "upload_time_iso_8601": "2025-01-29T16:05:28.740644Z",
            "url": "https://files.pythonhosted.org/packages/b9/71/f6201dfa44ac5305f026a6c7831fa26d789251dcfa405cca09accd6b0469/pycti-6.4.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2942cabcb7c92a1d483415755e9dd6f894486febc7cee239f50f0d76b242522b",
                "md5": "055a81c5792507d961412a577bd3c8e1",
                "sha256": "c3123d6b52718f1160abf846797134fb36758ce6134b9a8ce434d0d0529f1829"
            },
            "downloads": -1,
            "filename": "pycti-6.4.10.tar.gz",
            "has_sig": false,
            "md5_digest": "055a81c5792507d961412a577bd3c8e1",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 150290,
            "upload_time": "2025-01-29T16:05:31",
            "upload_time_iso_8601": "2025-01-29T16:05:31.100734Z",
            "url": "https://files.pythonhosted.org/packages/29/42/cabcb7c92a1d483415755e9dd6f894486febc7cee239f50f0d76b242522b/pycti-6.4.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-29 16:05:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "OpenCTI-Platform",
    "github_project": "client-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "circle": true,
    "requirements": [
        {
            "name": "datefinder",
            "specs": [
                [
                    "~=",
                    "0.7.3"
                ]
            ]
        },
        {
            "name": "pika",
            "specs": [
                [
                    "~=",
                    "1.3.0"
                ]
            ]
        },
        {
            "name": "python-magic",
            "specs": [
                [
                    "~=",
                    "0.4.27"
                ]
            ]
        },
        {
            "name": "python-magic-bin",
            "specs": [
                [
                    "~=",
                    "0.4.14"
                ]
            ]
        },
        {
            "name": "python_json_logger",
            "specs": [
                [
                    "~=",
                    "2.0.4"
                ]
            ]
        },
        {
            "name": "PyYAML",
            "specs": [
                [
                    "~=",
                    "6.0"
                ]
            ]
        },
        {
            "name": "pydantic",
            "specs": [
                [
                    "~=",
                    "2.10.4"
                ]
            ]
        },
        {
            "name": "requests",
            "specs": [
                [
                    "~=",
                    "2.32.2"
                ]
            ]
        },
        {
            "name": "setuptools",
            "specs": [
                [
                    "~=",
                    "71.1.0"
                ]
            ]
        },
        {
            "name": "cachetools",
            "specs": [
                [
                    "~=",
                    "5.5.0"
                ]
            ]
        },
        {
            "name": "prometheus-client",
            "specs": [
                [
                    "~=",
                    "0.21.1"
                ]
            ]
        },
        {
            "name": "opentelemetry-api",
            "specs": [
                [
                    "~=",
                    "1.22.0"
                ]
            ]
        },
        {
            "name": "opentelemetry-sdk",
            "specs": [
                [
                    "~=",
                    "1.22.0"
                ]
            ]
        },
        {
            "name": "deprecation",
            "specs": [
                [
                    "~=",
                    "2.1.0"
                ]
            ]
        },
        {
            "name": "filigran-sseclient",
            "specs": [
                [
                    ">=",
                    "1.0.2"
                ]
            ]
        },
        {
            "name": "stix2",
            "specs": [
                [
                    "~=",
                    "3.0.1"
                ]
            ]
        }
    ],
    "lcname": "pycti"
}
        
Elapsed time: 0.43204s