Experimental Python SDK for Flix
This project aims to provide a fully-featured Python SDK for interacting with Flix, the story development hub from Foundry. It also comes with a command line utility for performing some common actions from the terminal.
Requirements
This version of the SDK requires:
- Flix 7.0.0 or later
- Python 3.10 or later
Installing
Install the SDK using pip, or the package manager of your choice:
$ pip install flix-sdk
after which the CLI utility can be accessed as flix or python -m flix.
Usage
As a command-line utility
This package comes with a flix CLI utility that lets you perform some common actions.
At the moment you can use it to perform basic cURL-like requests, as well as to manage webhook.
$ flix --help
Usage: flix [OPTIONS] COMMAND [ARGS]...
Options:
-s, --server TEXT The URL of the Flix server.
-u, --username TEXT The username to authenticate with.
-p, --password TEXT The password to authenticate with.
--help Show this message and exit.
Commands:
config Set default configuration values.
contactsheet Manage contact sheet templates.
curl Perform cURL-like requests to a Flix server.
logout Log out the user from Flix by removing any active access...
webhook Manage webhooks.
To use the flix utility, you should configure what server and credentials to use.
This is best done either using environment variables, or the flix config command.
To use environment variables, you need to set the FLIX_SERVER, FLIX_USERNAME, and FLIX_PASSWORD variables:
$ export FLIX_SERVER=http://localhost:8080
$ export FLIX_USERNAME=admin
$ export FLIX_PASSWORD=admin
$ flix curl /servers
Not signed in, attempting to authenticate...
{"servers": ...}
You can also tell flix to remember your information using flix config:
$ flix config -s http://localhost:8080 -u admin -p admin
$ flix curl /servers
Not signed in, attempting to authenticate...
{"servers": ...}
Alternatively, you can provide the information directly to the flix command:
$ flix -s http://localhost:8080 -u admin -p admin curl /servers
Not signed in, attempting to authenticate...
{"servers": ...}
If you do not configure your credentials, flix will ask for them when attempting to log in:
$ flix -s http://localhost:8080 curl /servers
Not signed in, attempting to authenticate...
Username: admin
Password:
{"servers": ...}
As a library
This package also comes with an asyncio-based library to help you interact with Flix from your own Python scripts.
See the examples folder for examples of how to use it.
Versioning policy
The Flix SDK follows semantic versioning:
- The major version is increased if a breaking change is introduced, either at the Flix API level, or in the Flix SDK itself.
- The minor version is increased if new features are added without breaking existing functionality, with a note in the documentation explaining what Flix version is required for the new features.
- The patch version is increased if a bug fix is made without changing functionality.
To ensure that an update will not break existing applications, we recommend specifying a dependency on flix-sdk in the form of ^1.2.3 or, equivalently, >=1.2.3 <2.0.0.
Development
This project makes use of Poetry for packaging and dependency management. You can install a local development copy along with all dependencies using the `poetry´ command:
$ pip install poetry
$ poetry install
Metadata
Release files for flix-sdk 2.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| flix_sdk-2.0.1.tar.gz | 75.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| flix_sdk-2.0.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 198.8 kB
Release files / flix_sdk-2.0.1.tar.gz
| Download URL | flix_sdk-2.0.1.tar.gz |
|---|---|
| Size | 75.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d26c81fc96e3a067133fc030f0dff4d8cfdfa89a4e3a818895160f8c912a6cab
|
|
BLAKE2b-256 checksum How to use checksums |
e73d6fb9671fc3454c017f738163635d02e868aa703ac83c3d8fa368b002ec21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.12.0 Linux/5.15.0-97-generic
|
Release files / flix_sdk-2.0.1-py3-none-any.whl
| Download URL | flix_sdk-2.0.1-py3-none-any.whl |
|---|---|
| Size | 123.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
70aa6f184052d35a5987dc0279a065f8e426dd8b49b82993176110271a24ac84
|
|
BLAKE2b-256 checksum How to use checksums |
a8e9beb076c3cc8d9a7fd3c7746a363c4ee9a4696436e41c74456fe2c4ea3404
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.6.1 CPython/3.12.0 Linux/5.15.0-97-generic
|
Security for flix-sdk 2.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.