Python library for the tracks API
Project description
fluidattacks-tracks
The Tracks Python library provides convenient access to the Tracks API from any Python 3.11+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by httpx.
Usage
from datetime import datetime
from fluidattacks_tracks import Tracks
from fluidattacks_tracks.resources.event import Event
client = Tracks()
client.event.create(
Event(
action="CREATE",
author="author",
date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
mechanism="API",
metadata={"foo": "bar"},
object="object",
object_id="object_id",
)
)
Async usage
Simply import AsyncTracks instead of Tracks and use await with each API call:
import asyncio
from datetime import datetime
from fluidattacks_tracks import Tracks
from fluidattacks_tracks.resources.event import Event
client = AsyncTracks()
async def main() -> None:
await client.event.create(
Event(
action="CREATE",
author="author",
date=datetime.fromisoformat("2019-12-27T18:11:19.117"),
mechanism="API",
metadata={"foo": "bar"},
object="object",
object_id="object_id",
)
)
asyncio.run(main())
Functionality between the synchronous and asynchronous clients is otherwise identical.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fluidattacks_tracks-0.3.0.tar.gz.
File metadata
- Download URL: fluidattacks_tracks-0.3.0.tar.gz
- Upload date:
- Size: 7.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
487ad31f877b2b2dcf08f2f5eed2dba87b8e9da704da8c5d9a71a0f28a18855c
|
|
| MD5 |
8551bebe59a58da6290f98184d215b94
|
|
| BLAKE2b-256 |
ba9127760a98ed5e53c6b01c1e137bf409c40569320ea10c85dc22c06494198e
|
File details
Details for the file fluidattacks_tracks-0.3.0-py3-none-any.whl.
File metadata
- Download URL: fluidattacks_tracks-0.3.0-py3-none-any.whl
- Upload date:
- Size: 3.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bcd19efa9349450e41dd3295beb2e2cc5ee895b26f3f2143ed07e489b771bab5
|
|
| MD5 |
0e07e77e51fc927f0389ffb7004cfd3b
|
|
| BLAKE2b-256 |
6c26128321d4d21398bcd7591295d11c6c410754b19c991d52a831baff3930a7
|