Polyswarm Customer CLI
A CLI tool for interacting with the PolySwarm Customer APIs.
Supports Python 3.10 and greater.
Installation
From PyPI:
pip install polyswarm
From source:
python setup.py install
Usage
Command line client
See the Polyswarm Customer CLI documentation for usage guidance.
Using as a package
The polyswarm-cli package is built on top of the polyswarm-api package, and it includes
a set of higher-level methods that facilitates the usage of parallelism when making requests
to the api. We provide a class Polyswarm that extends from PolyswarmAPI and includes
these methods. For example:
from polyswarm.polyswarm import Polyswarm
api = Polyswarm('my-api-key')
results = api.search_hashes(['e182cdfd5e7463d11f5e7bc49b4377ab25e58b9ff04266df3c34e6261c7b0df9',
'd80a1e42791d17cbce8d053afccd1dae7fb9f615676cb81a3a1699e86c344cb8',
'275a021bbfb6489e54d471899f7db9d1663fc695ec2fe2a2c4538aabf651fd0f'])
for result in results:
print(result.id)
Each hash lookup is done in a different thread using a ThreadPoolExecutor and results are yielded
as they come in the same order as in the input. All functionality that is available in the command
line tool is also available for developers through this class.
Automated Tests
To run automated tests suite (unit and integration):
pip install -r requirements.txt
pytest
To check current coverage by tests:
pytest --cov=polyswarm tests/
Questions? Problems?
File a ticket or email us at info@polyswarm.io.
Metadata
Release files for polyswarm 4.5.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| polyswarm-4.5.0.tar.gz | 43.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| polyswarm-4.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 97.1 kB
Release files / polyswarm-4.5.0.tar.gz
| Download URL | polyswarm-4.5.0.tar.gz |
|---|---|
| Size | 43.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3b9fa2c75f300094284bf1177fbaf8f667494978e4e17d232c00793b8c59c07
|
|
BLAKE2b-256 checksum How to use checksums |
b37f8acb91d79142c70777155e5b8b59f86935783862cb5530651d754d959dd0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / polyswarm-4.5.0-py3-none-any.whl
| Download URL | polyswarm-4.5.0-py3-none-any.whl |
|---|---|
| Size | 54.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd7ba99fbaab31a4e7bd6ac98ee570cbd3f260fde864972cc8244ea682d85310
|
|
BLAKE2b-256 checksum How to use checksums |
f0719e6808cc70b851b993cf47bf94f7a703286e52fe66ac2660e122d805f7c1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|