polyswarm 3.9.0
pip install polyswarm
Released:
CLI for using the PolySwarm Customer APIs
Navigation
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: PolySwarm Developers
- Requires: Python <4, >=3.7
-
Provides-Extra:
yara
Classifiers
- Intended Audience
- License
- Operating System
- Programming Language
Project description
Polyswarm Customer CLI
A CLI tool for interacting with the PolySwarm Customer APIs.
Supports Python 3.7 and greater.
Installation
From PyPI:
pip install polyswarm
From source:
python setup.py install
If you want yara validation (optional):
pip install -e .[yara]
If you get an error about a missing package named
wheel
, that means your version of pip or setuptools is too old. You need pip >= 19.0 and setuptools >= 40.8.0. To update pip, runpip install -U pip
. To update setuptools, runpip install -U setuptools
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 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
.
Project details
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: MIT License (MIT)
- Author: PolySwarm Developers
- Requires: Python <4, >=3.7
-
Provides-Extra:
yara
Classifiers
- Intended Audience
- License
- Operating System
- Programming Language
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file polyswarm-3.9.0.tar.gz
.
File metadata
- Download URL: polyswarm-3.9.0.tar.gz
- Upload date:
- Size: 28.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f49b788a651f0197bc3fcefd863759cc7030c8d129e29ec30f6a16370cc61961 |
|
MD5 | f652c569625f375ee9af45662b6720a3 |
|
BLAKE2b-256 | cb57e239eef3a94c3d033162bd0e978ce8ae0316ea4b08721781e4ee22a4595c |
File details
Details for the file polyswarm-3.9.0-py3-none-any.whl
.
File metadata
- Download URL: polyswarm-3.9.0-py3-none-any.whl
- Upload date:
- Size: 37.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a323fe1b06169126a645ff0341db39074464b814bab5e3e4de0212bf2220386d |
|
MD5 | a97c77d2feb7cf4bf655aaf20bd785b0 |
|
BLAKE2b-256 | c04bb20f20e369c829d73f28f5260c2a42cd7eae7ee0878b5e177d2215e6b809 |