Skip to main content

Official Python SDK for the Pashudhan Nutri AI API

Project description

Pashudhan Nutri AI — Official Python SDK

The official Python client library for the Pashudhan Nutri AI API.

This SDK provides a clean, typed interface to generate NASEM 2021 compliant dairy rations using Linear Programming. Zero formulation logic is exposed — all equations, ingredient databases, and AI models run securely on our backend.

Installation

pip install pashudhan_ai

Quickstart

import pashudhan_ai

# Initialize the client with your API key
client = pashudhan_ai.Client(api_key="pd_your_api_key_here")

# Generate a ration
result = client.formulate(
    animal_type="cow",
    breed="HF_crossbred",
    body_weight_kg=450,
    milk_yield_kg_day=18,
    fat_pct=3.5,
    production_stage="lactating",
    state="Punjab",
    month=5
)

# Access the least cost option
print(f"Total Cost: ₹{result.least_cost.total_cost_inr}/day")

for ingredient in result.least_cost.ingredients:
    print(f"{ingredient.name}: {ingredient.kg_fresh_day} kg")
# Fetch available ingredients for a specific country
india_ingredients = client.get_ingredients_list(country="India")
print(f"Loaded {india_ingredients['total_ingredients']} ingredients from DB.")

# Check API usage and plan
status = client.status()
print(f"Plan: {status.plan}, Used: {status.requests_used}/{status.monthly_limit}")

Features

  • Metadata Endpoints: Access the exact ingredient IDs, regional prices, supported countries, and dairy breeds available to perfectly sync your front-end picker UIs.
  • Fully Typed: Data models for all API responses.
  • Secure: Only acts as a wrapper for HTTP requests.
  • Lightweight: Only relies on requests.

Documentation

For full API reference, visit the Developer Portal.

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

pashudhan_ai-0.1.11.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

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

pashudhan_ai-0.1.11-py3-none-any.whl (8.2 kB view details)

Uploaded Python 3

File details

Details for the file pashudhan_ai-0.1.11.tar.gz.

File metadata

  • Download URL: pashudhan_ai-0.1.11.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pashudhan_ai-0.1.11.tar.gz
Algorithm Hash digest
SHA256 fbedba9ac2f3a2d95cc4a858f2a9d1c05eb0724c48a41d91a5d1b7f0f2462a9f
MD5 956ece7272db52535a55ebffbcaa244f
BLAKE2b-256 0abc5d10c7558a54b33af8b4d29abb18f53d40e0fabc5564b0c54e6d9fc9e43a

See more details on using hashes here.

File details

Details for the file pashudhan_ai-0.1.11-py3-none-any.whl.

File metadata

  • Download URL: pashudhan_ai-0.1.11-py3-none-any.whl
  • Upload date:
  • Size: 8.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for pashudhan_ai-0.1.11-py3-none-any.whl
Algorithm Hash digest
SHA256 340aec390f5c9534e023574e92d0c79f164f1b4d0a366ad633c0a12d52c5c8c2
MD5 f3ddc915c081a955ee026c9a3f734529
BLAKE2b-256 459cee04f9903d0405f3f718ea8bdbeedafae197b664c44dc3849207823e33aa

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