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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

polyswarm-4.3.0.tar.gz (38.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polyswarm-4.3.0-py3-none-any.whl (49.0 kB view details)

Uploaded Python 3

File details

Details for the file polyswarm-4.3.0.tar.gz.

File metadata

  • Download URL: polyswarm-4.3.0.tar.gz
  • Upload date:
  • Size: 38.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for polyswarm-4.3.0.tar.gz
Algorithm Hash digest
SHA256 26185936f2f4d37925cfab22d38515db3b71542bb33d16fb1f588411ee5c1df0
MD5 6262c2877173e5c0f8e3c33b98342d25
BLAKE2b-256 c0fe4fed06bc86276941f1c08ea70f299dc0e471f6581fd914f83669772cc5ed

See more details on using hashes here.

File details

Details for the file polyswarm-4.3.0-py3-none-any.whl.

File metadata

  • Download URL: polyswarm-4.3.0-py3-none-any.whl
  • Upload date:
  • Size: 49.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for polyswarm-4.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5a399bce44ba77da10ead68c8fa566109746379acfa6e35c79ccf47fd673c2d
MD5 5097e735c1b4880581ce181a5e64ee4a
BLAKE2b-256 91ff12a843bd748763b89fa1ffcd6a403268673ef13683ae4bb3ad464337d158

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.3.0 This release

2 files

4.2.1

2 files

4.2.0

2 files

4.1.0

2 files

4.0.0

2 files

3.20.0

2 files

3.19.0

2 files

3.18.0

2 files

3.17.0

2 files

3.16.1

2 files

3.15.0

2 files

3.13.0

2 files

3.12.0

2 files

3.11.1

2 files

3.11.0

2 files

3.10.0

2 files

3.9.0

2 files

3.8.1

2 files

3.8.0

2 files

3.7.0

2 files

3.6.0

2 files

3.5.2

2 files

3.5.1

2 files

3.5.0

2 files

3.4.1

2 files

3.4.0

2 files

3.3.0

2 files

3.2.1

2 files

3.2.0

2 files

3.1.2

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

2.7.0

2 files

2.6.2

2 files

2.6.1

2 files

2.6.0

2 files

2.5.0

2 files

2.4.2

2 files

2.4.1

2 files

2.4.0

2 files

2.3.1

2 files

2.3.0

2 files

2.2.1

2 files

2.2.0

2 files

2.1.3

2 files

2.1.2

2 files

2.1.1

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.1.2

2 files

1.1.1

2 files

1.0.1

2 files

1.0.0

2 files

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