Skip to main content

No project description provided

Project description

🦁 lion-openai

Python Version PyPI - Downloads Discord

Welcome to lion-openai, a powerful Python library for seamless integration with OpenAI's APIs. As part of the lion ecosystem, lion-openai provides a robust, type-safe, and user-friendly interface for interacting with OpenAI's services.

🌟 Features

  • 🔄 Asynchronous API calls for efficient performance
  • 🧩 Easy integration with other lion ecosystem components
  • 📊 Type-safe request and response models using Pydantic
  • 🛠 Customizable API configurations
  • 🧪 Comprehensive test suite
  • 🔒 Built-in error handling and retries

🗺 System Architecture

Here's how lion-openai fits into the lion ecosystem:

graph TD
    A[lion Ecosystem] --> B[lion-openai]
    B --> C[OpenAI API]
    A --> D[Other lion Components]
    B --> E[Type-safe Models]
    B --> F[Async Operations]

🚀 Installation

lion-openai uses Poetry for dependency management. To install:

poetry add lion-openai

Or if you're using pip:

pip install lion-openai

👨‍💻 Development Setup

  1. Ensure you have Python 3.10 or newer installed.
  2. Install Poetry:
    curl -sSL https://install.python-poetry.org | python3 -
    
  3. Clone the repository:
    git clone https://github.com/lion-agi/lion-openai.git
    cd lion-openai
    
  4. Install dependencies:
    poetry install
    
  5. Set up pre-commit hooks:
    poetry run pre-commit install
    

🧪 Testing

We use pytest for our test suite. To run the tests:

poetry run pytest

🧹 Code Quality

We use several tools to maintain code quality:

  • Black: For code formatting
  • isort: For sorting imports
  • Flake8: For style guide enforcement
  • mypy: For static type checking

These tools are run automatically via pre-commit hooks before each commit. You can also run them manually:

poetry run pre-commit run --all-files

🛠 CI/CD

We use GitHub Actions for our CI/CD pipeline. On every push and pull request:

  • Tests are run
  • Code quality checks are performed
  • Documentation is built and deployed

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for more details.

Before submitting a pull request:

  1. Ensure all tests pass
  2. Update documentation as needed
  3. Add any necessary tests for new functionality

📄 License

lion-openai is released under the MIT License. See the LICENSE file for details.

🙏 Acknowledgements

  • OpenAI for their fantastic API
  • The entire lion ecosystem team and contributors

Remember, in the lion-openai jungle, we roar with code! 🦁💻

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

lion_openai-1.0.0.tar.gz (34.7 kB view details)

Uploaded Source

Built Distribution

lion_openai-1.0.0-py3-none-any.whl (63.5 kB view details)

Uploaded Python 3

File details

Details for the file lion_openai-1.0.0.tar.gz.

File metadata

  • Download URL: lion_openai-1.0.0.tar.gz
  • Upload date:
  • Size: 34.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for lion_openai-1.0.0.tar.gz
Algorithm Hash digest
SHA256 d11d6d49e0b298ac00c7e9c677e42353a8b20a4a07b3931fbdb5a5af2a3b89dc
MD5 f774893553807b6146f0c8b960e69222
BLAKE2b-256 418637b440cbdbe9d981a0a8c3c6fba9031eb9ff9af7c627a4adfb998cf1459d

See more details on using hashes here.

File details

Details for the file lion_openai-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: lion_openai-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 63.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.12.7 Linux/6.5.0-1025-azure

File hashes

Hashes for lion_openai-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e25a231d7d02cb331fc26161e76d0e7c225a1a5f1c6372bed92d07f25188e011
MD5 e4f90345b27a79ad60c88d3b4ff5d9c5
BLAKE2b-256 7bef0b31f5e4ad191b6a2cdca8394023897c53e1552c23dbb0457a777d17d547

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page