No project description provided
Project description
fractal-model-api
A small Python client for interactions with the Fractal Model API.
Requirements
- Python 3.8+
Installation
Install the package (and optionally python-dotenv if you prefer using a .env file):
pip install fractal-model-api python-dotenv
Usage
This project does not automatically load a .env file. You must either set the required environment variables on your system or explicitly load the .env file from your script.
- Create a file named .env in the project root with your API credentials:
FM_API_KEY=your_api_key_here
FM_API_SECRET=your_api_secret_here
2a. Easiest for non-technical users — add one line to your script to load the .env file (requires python-dotenv):
import asyncio
from dotenv import load_dotenv
load_dotenv() # loads environment variables from ` .env`
from fractal_model_api import FractalModelAPIClient
async def main():
client = FractalModelAPIClient()
optimized = await client.get_optimized_schedule_lt(file_path="path/to/your/input_file")
print(optimized)
if __name__ == "__main__":
asyncio.run(main())
2b. Or set environment variables in your terminal before running your script:
For linux:
export FM_API_KEY=your_api_key_here
export FM_API_SECRET=your_api_secret_here
python your_script.py
For Windows (cmd):
set FM_API_KEY=your_api_key_here
set FM_API_SECRET=your_api_secret_here
python your_script.py
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
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 fractal_model_api-0.1.7.tar.gz.
File metadata
- Download URL: fractal_model_api-0.1.7.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.11 Linux/6.12.61-1-lts
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
18e409108eb68ce95ae3ebbe0e9d2d69d53c6eb0e0f5904c7bf9531b9fa6702c
|
|
| MD5 |
7b471db1a66e1f6ffc5d60979b2f6437
|
|
| BLAKE2b-256 |
cec6d99fdd8ca41b1c95add44f72fc5414a0442497de4e0cb2a27f3aa9300c03
|
File details
Details for the file fractal_model_api-0.1.7-py3-none-any.whl.
File metadata
- Download URL: fractal_model_api-0.1.7-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.2.1 CPython/3.13.11 Linux/6.12.61-1-lts
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a0ce1adf2435c7c4d63c3eb5a422fff11b52c542ab000eddc313f0fcdd204475
|
|
| MD5 |
6e898b39b700d6567bf9c634e1b576c5
|
|
| BLAKE2b-256 |
ea2590392df0641fbc61417d3e6c9082d9e6009920e0aebc36e3d800585cef32
|