We have a python SDK source code.
Use of the SDK is encouraged.
Because the API design prioritizes flexibility while the SDK focuses on ease of use for common patterns.
Quickstart
pip install diffgram
On linux pip3 install diffgram
- Get Authentication credentials
- Config
- Try some of the samples
Setup your project
Here we import diffgram and declare a project.
A project acts as the client for making requests to Diffgram APIs and access to relevant functions.
from diffgram import Project
project = Project(
host = "https://diffgram.my_domain.com",
project_string_id = "example",
client_id = "example_LIVE__mhgzzy0uzro21dqnvo334",
client_secret = "example_msqiagl0pn773r3pp51xvwnaif0vq7zuroliioqi")
Import a file
We can do this in one line, with the _path _being a local file path
The file object is useful for things like attaching it to a Job.
file = project.file.from_local(local_file_path)
# Or
result = project.file.from_url(signed_url)
Please see github for more examples
SDK functions in documentation
Where possible we include relevant information on the equivalent SDK function near the API, scroll down on each API reference to see it if available.