This repo contains a Python software development kit to interface with the Swarms' API, as well as examples of use.
This has been tested with Python 2.7 and Python 3.5 (should work with other 3.x
versions too). Install the package from PyPI with pip install swarms-sdk
or
include swarms-sdk
in your requirements.txt
file.
To get your credentials, you currently need to shoot us an email:
[email protected]
Simplest sample usage:
from swarms.sdk import services
config = lambda: None
config.base_url = 'https://api.swarms.tech/'
config.username = '[email protected]'
config.password = 'password'
campaigns, jobs, tasks, results = services.get(config)
print(campaigns.get_page())
For more usage examples, please look at how to create resources, retrieve resources, and delete everything.
The SDK downloads any referenced resources and uploads them to Swarms' servers. This is done to prevent breakage when the original resources disappear.
Please see the API docs for general information. See the components overview to learn what types of components are available in your tasks.
To release a new version, increase version number in setup.py
, create package
with python setup.py sdist
and release the package with twine upload
.