Autonomize Core
Overview
Autonomize Core houses the core functionality about authentication of our in-house platform.
Features
- Authentication: The SDK allows you to authenticate tokens for Modelhub.
- High scalability: Built to handle large-scale data retrieval and generation, enabling robust, production-ready applications.
Installation
- Create a virtual environment, we recommend Miniconda for environment management:
conda create -n autocore python=3.12 conda activate autocore
- Install the package:
pip install autonomize-core
To install with optional dependencies like Qdrant, Huggingface, OpenAI, Modelhub, etc., refer to the Installation Guide.
Usage
Authentication Types
The SDK supports three authentication methods:
- OAuth 2.0 Client Credentials Flow (default)
- API Key Authentication
- Permanent Token Authentication
Sync Usage
OAuth Authentication (Default)
import os
from autonomize.core.credential import ModelhubCredential
cred = ModelhubCredential(
modelhub_url=MODELHUB_URI,
client_id=MODELHUB_AUTH_CLIENT_ID,
client_secret=MODELHUB_AUTH_CLIENT_SECRET,
)
token = cred.get_token() # Returns JWT token from OAuth flow
API Key Authentication
from autonomize.core.credential import ModelhubCredential
# Using API key directly (no OAuth flow)
cred = ModelhubCredential(
api_key="your-api-key-here"
)
token = cred.get_token() # Returns API key directly
Permanent Token Authentication
from autonomize.core.credential import ModelhubCredential
from autonomize.types.core.credential import AuthType
# Using permanent token with explicit auth_type
cred = ModelhubCredential(
token="your-permanent-token-here",
auth_type=AuthType.PERMANENT_TOKEN
)
token = cred.get_token() # Returns token directly without validation
Async Usage
Simply use sync methods with a prefix and use await for each call:
import asyncio
from autonomize.core.credential import ModelhubCredential
from autonomize.types.core.credential import AuthType
async def main():
# OAuth authentication
cred = ModelhubCredential(
modelhub_url=MODELHUB_URI,
client_id=MODELHUB_AUTH_CLIENT_ID,
client_secret=MODELHUB_AUTH_CLIENT_SECRET,
)
token = await cred.aget_token()
# API key authentication
cred_api = ModelhubCredential(api_key="your-api-key")
api_key = await cred_api.aget_token()
# Permanent token authentication
cred_perm = ModelhubCredential(
token="your-permanent-token",
auth_type=AuthType.PERMANENT_TOKEN
)
perm_token = await cred_perm.aget_token()
asyncio.run(main())
New preferred environment variables:
MODELHUB_URI=https://your-modelhub.com
MODELHUB_AUTH_CLIENT_ID=your_client_id
MODELHUB_AUTH_CLIENT_SECRET=your_secret
MODELHUB_API_KEY=your_api_key
GENESIS_CLIENT_ID=your_genesis_client
Old environment variables (still work for backward compatibility):
MODELHUB_BASE_URL=https://your-modelhub.com
MODELHUB_CLIENT_ID=your_client_id
MODELHUB_CLIENT_SECRET=your_secret
CLIENT_ID=your_client
COPILOT_ID=your_copilot
GENESIS_COPILOT_ID=your_copilot
Contribution
To contribute in our Autonomize Core SDK, please refer to our Contribution Guidelines.
License
Copyright (C) Autonomize AI - All Rights Reserved
The contents of this repository cannot be copied and/or distributed without the explicit permission from Autonomize.ai
Metadata
Release files for autonomize-core 0.1.16
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 | Actions |
|---|---|---|---|---|
| autonomize_core-0.1.16.tar.gz | 11.3 kB | Without provenance | Details for autonomize_core-0.1.16.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| autonomize_core-0.1.16-py3-none-any.whl | Python 3 | none | any | Details for autonomize_core-0.1.16-py3-none-any.whl |
Total release size: 25.6 kB
Release files / autonomize_core-0.1.16.tar.gz
| Download URL | autonomize_core-0.1.16.tar.gz |
|---|---|
| Size | 11.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8fe23cdbbce163823aae37aadd2c71715503e1ea9326f589a35f5bf4120e1b21
|
|
BLAKE2b-256 checksum How to use checksums |
e8a6fb28a2c5320eb01de3911246f78d3eb76c3686ca83acf19a674761f9e0ea
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.11 Linux/6.11.0-1018-azure
|
Release files / autonomize_core-0.1.16-py3-none-any.whl
| Download URL | autonomize_core-0.1.16-py3-none-any.whl |
|---|---|
| Size | 14.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8d06bda053a413c7fccceaccef57471ba5b705bfcba39bb61d32dee305c60429
|
|
BLAKE2b-256 checksum How to use checksums |
2fee2940e8e0d37fcb1a57a558ed26e7a4deb04e8ed6efd175958f779bd22ca4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.2.1 CPython/3.12.11 Linux/6.11.0-1018-azure
|
Security for autonomize-core 0.1.16
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.