Skip to main content

🦁 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! 🦁💻

Metadata

Release files for lion-openai 1.0.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lion-openai 1.0.3
File Size Uploaded Provenance
lion_openai-1.0.3.tar.gz 37.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for lion-openai 1.0.3
File Interpreter ABI Platform
lion_openai-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 99.8 kB

Release files / lion_openai-1.0.3.tar.gz

Download URL lion_openai-1.0.3.tar.gz
Size 37.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ed3680b9c0fe986f503253f8b12ec91981b46a836ae3c21ea8ebc0e948c4228c
BLAKE2b-256 checksum
How to use checksums
59c08b7cce7c84743671370b1f626bbdc7cce61eb6c34ad98f1118947a9cd36d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Release files / lion_openai-1.0.3-py3-none-any.whl

Download URL lion_openai-1.0.3-py3-none-any.whl
Size 62.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2f13370e7f4a8e51a6dd7712d0f5c0372eb53c27e89565f1bb0dfade89bdb81a
BLAKE2b-256 checksum
How to use checksums
b852f0e682b54d938c7a15d73df0fd22e327d4854bdb9d79b2dfb5175defc04c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.12.8

Security for lion-openai 1.0.3

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page