Swarms API Python Client Library
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
swarms
.DS_Store
.editorconfig
.gitignore
.travis.yml
LICENSE.txt
README.md
setup.py

README.md

Swarms API Python SDK

This repo contains a Python software development kit to interface with the Swarms' API, as well as examples of use.

Get started

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: info@swarms.tech

Examples

Simplest sample usage:

from swarms.sdk import services

config = lambda: None
config.base_url = 'https://api.swarms.tech/'
config.username = 'email@example.com'
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.

Resource upload

The SDK downloads any referenced resources and uploads them to Swarms' servers. This is done to prevent breakage when the original resources disappear.

Information about the API

Please see the API docs for general information. See the components overview to learn what types of components are available in your tasks.

Development

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.