Skip to main content

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

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for polyswarm 4.7.0
File Size Uploaded Provenance
polyswarm-4.7.0.tar.gz 44.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for polyswarm 4.7.0
File Interpreter ABI Platform
polyswarm-4.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 99.8 kB

Release files / polyswarm-4.7.0.tar.gz

Download URL polyswarm-4.7.0.tar.gz
Size 44.2 kB
Tags Source
SHA-256 checksum
How to use checksums
8ba8f6a04b86f194efc2d2cc5e89f1050a135853e735f7f9f55d706618342e79
BLAKE2b-256 checksum
How to use checksums
c063326ddfaa465dcd8b4be148b457a636e7922f856f7be73af2c7f787946f81
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Release files / polyswarm-4.7.0-py3-none-any.whl

Download URL polyswarm-4.7.0-py3-none-any.whl
Size 55.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fdb4b9d2babb2370fc32d347b3a8ded69ea7b898e2ee9887fe8a8bb55b1cebb7
BLAKE2b-256 checksum
How to use checksums
7fc46b4b59b7ecafa74a1f8294f9569b09cca270a5179c1dca2f50b41c1271de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for polyswarm 4.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

4.7.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page