Skip to main content

Python wrapper for Llama AI API

Reason this release was yanked:

outdated

Project description

llama_module

llama_module is a lightweight Python wrapper for the Llama AI API, allowing you to easily send messages and receive AI-generated responses.

Installation

Install via pip:

pip install llama_module

Requirements: • Python 3.9+ • requests • python-dotenv

Make sure you have an environment variable llama_ai set with your Llama AI API key, e.g., in a .env file:

llama_ai = your_api_key_here

Usage

from llama_module import call_ai

Single message

response = call_ai("Hello, Llama!")

print(response)

Multiple messages

messages = [ {"role": "user", "content": "Hello!"}, {"role": "assistant", "content": "Hi there! How can I help?"} ]

response = call_ai(messages)

print(response)

Features:

•	Supports single and multi-message inputs
•	Automatically reads API key from environment variables
•	Simple and easy-to-use interface
•	You can specify the model used with the variable 'model' which defualts to Llama-4-Maverick-17B-128E-Instruct-FP8

Dependencies

•	requests
•	python-dotenv

License

MIT License – see LICENSE for details.

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

ai_llama_module-0.1.5.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

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

ai_llama_module-0.1.5-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file ai_llama_module-0.1.5.tar.gz.

File metadata

  • Download URL: ai_llama_module-0.1.5.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for ai_llama_module-0.1.5.tar.gz
Algorithm Hash digest
SHA256 ba03868d2410e6850874938c45f7c40e6346e196d9865ed2553090edbc95965a
MD5 57e9668ae9416abb22dae4bd2c3deb09
BLAKE2b-256 256b68ff2eda67a2bbfdc54a6cb560a06eaaf9e779516670ed1455334e86c3be

See more details on using hashes here.

File details

Details for the file ai_llama_module-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for ai_llama_module-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 871c886d95ba6d8fc947af44479cd1bbeb6aea5199d23670a9e322d841fd6864
MD5 8265b6f6eafcd3be6703ab94e8a0373e
BLAKE2b-256 0a16bdf1f80ab7d45f06cae55147927a87fb9d4293168783fae032e635ad584f

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