Skip to main content

A client library for generating images through the flix-imagen API

Project description

Imagen SDK

A proprietary client library for generating images through the flix-imagen API.

Authorized Flixstock users only. A signed runtime license file is required before the SDK can be used.

Installation

pip install imagen-sdk

Runtime license file

Before creating a client, obtain a signed license file from Flixstock. The SDK checks for a license in this order:

  1. license_path argument to ImagenClient
  2. IMAGEN_SDK_LICENSE environment variable
  3. ./imagen-sdk.license or ./license.json in the working directory
  4. ~/.config/imagen-sdk/license.json

Example license format: see license.example.json.

Issue a license (Flixstock admins)

python scripts/issue_license.py \
  --licensee "Jane Doe" \
  --email "jane.doe@flixstock.com" \
  --output imagen-sdk.license

Allowed email domains: @flixstock.com, @imageedit.ai.

Usage

from imagen_sdk import ImagenClient, LicenseError

try:
    client = ImagenClient(
        base_url="https://imagen-api.flixstock.com",
        api_key="your-api-key",
        license_path="/path/to/imagen-sdk.license",
    )
except LicenseError as exc:
    print(exc)

Or set the environment variable:

export IMAGEN_SDK_LICENSE=/path/to/imagen-sdk.license
from imagen_sdk import ImagenClient

client = ImagenClient(
    base_url="https://imagen-api.flixstock.com",
    api_key="your-api-key",
)

Development

python -m venv .venv
.venv\Scripts\activate          # Windows
# source .venv/bin/activate     # macOS/Linux

pip install --upgrade pip build twine pytest
python scripts/issue_license.py --licensee "Dev User" --email "dev@flixstock.com"
pytest
python -m build

License

Proprietary — see LICENSE. Unauthorized use, copying, or distribution is prohibited.

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

imagen_sdk-0.0.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

imagen_sdk-0.0.1-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file imagen_sdk-0.0.1.tar.gz.

File metadata

  • Download URL: imagen_sdk-0.0.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for imagen_sdk-0.0.1.tar.gz
Algorithm Hash digest
SHA256 e9f1a45e3c55dccd40614343bfba58bd87f6b02bd7ca0a361b3f23f56d21b236
MD5 79e4ce6ffe5da2641cd6018fde90e810
BLAKE2b-256 7ed7dd3ae070d2aca81efeb26d8b22cd50b316a67c92db3e6068daa185e27251

See more details on using hashes here.

File details

Details for the file imagen_sdk-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: imagen_sdk-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for imagen_sdk-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 26c8dda9d13233c98575cbb25f5c93ab276246a736ea53efdcccf637d2f993dc
MD5 8388fb975a7e9751f123395969ef468b
BLAKE2b-256 ebefa2239f84e5e4c6e2b50552124beefb8684ee1e5b1970cb7fda5c5eea9699

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