Skip to main content

Fl33t API Client

Project description

The Fl33t API Client is a Python module for interacting with fl33t. It requires Python 3+.

Example usage

Setup a Fl33t client:

from fl33t import Fl33tClient

team_id = '<your-team-id>'
token = '<your-token>'

client = Fl33tClient(team_id, token)

Retrieve all trains/fleets/devices and if there are any upgrades pending:

for train in client.list_trains():
    print(train)
    for fleet in train.fleets():
        print(fleet)
        for device in fleet.devices():
            print(device)
            fw_upgrade = device.checkin()
            if fw_upgrade:
                print(fw_upgrade)

Upload new build to a train:

train_id = '<your-train-id>'
version = '<your-version-id>'
filename = '<full/path/to/your-firmware-file>'

build = client.Build(
    train_id=train_id,
    version=version,
    filename=filename
)

print(build.create())

Project details


Download files

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

Source Distribution

fl33t-0.6.2.tar.gz (14.7 kB view details)

Uploaded Source

File details

Details for the file fl33t-0.6.2.tar.gz.

File metadata

  • Download URL: fl33t-0.6.2.tar.gz
  • Upload date:
  • Size: 14.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for fl33t-0.6.2.tar.gz
Algorithm Hash digest
SHA256 10dc1c95b2b8e6c73878927024af6aeae69437606f895c8ff61f539aaaad2c15
MD5 20a09d673091413f923820ad335bad87
BLAKE2b-256 8d9abe0bca6a8130f30b40401f8b4dc0e04bf3d7b4bfd66015957619ab747464

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page