Skip to main content

Autonomize Core contains the unified authentication source to access platform.

Project description

Autonomize Core

Python Version PyPI Version Code Formatter Code Linter Code Checker Code Coverage

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

  1. Create a virtual environment, we recommend Miniconda for environment management:
    conda create -n autocore python=3.12
    conda activate autocore
    
  2. Install the package:
    pip install autonomize-core
    

To install with optional dependencies like Qdrant, Huggingface, OpenAI, Modelhub, etc., refer to the Installation Guide.

Usage

Sync Usage

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()

Async Usage

Simply use sync methods with a prefix and use await for each call. Example: cred.get_token() becomes await cred.aget_token() and everything else remains the same.

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 = await cred.aget_token()

New preferred environment variables:

MODELHUB_URI=https://your-modelhub.com
MODELHUB_AUTH_CLIENT_ID=your_client_id
MODELHUB_AUTH_CLIENT_SECRET=your_secret
GENESIS_CLIENT_ID=your_genesis_client
GENESIS_COPILOT_ID=your_copilot

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

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

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

autonomize_core-0.1.12.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

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

autonomize_core-0.1.12-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file autonomize_core-0.1.12.tar.gz.

File metadata

  • Download URL: autonomize_core-0.1.12.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for autonomize_core-0.1.12.tar.gz
Algorithm Hash digest
SHA256 819e239334193e3c08e648c4edadec6571b76243f61c9c9a383da3793473d7dd
MD5 981aa3e063a5c6a09a1ed6d404a172a0
BLAKE2b-256 b329ee8045ed4d074626e5dec8637b2dbd5218590c6c3db3916925edebcbe6ed

See more details on using hashes here.

File details

Details for the file autonomize_core-0.1.12-py3-none-any.whl.

File metadata

  • Download URL: autonomize_core-0.1.12-py3-none-any.whl
  • Upload date:
  • Size: 12.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.12.11 Linux/6.11.0-1018-azure

File hashes

Hashes for autonomize_core-0.1.12-py3-none-any.whl
Algorithm Hash digest
SHA256 b9f2ec049dc432e089126103cee6c0ee442c417da80feeed5295d3a3fd729173
MD5 58b84c25a87e3b357ba34c982e938294
BLAKE2b-256 14705fd363ad363be39ea80fceb1baa3ad80033e272ab8b1f73b3fb0a5c5ee7c

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