Skip to content

darshjme/maryada

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
मर्यादा — maryada by Darshankumar Joshi

🌊 मर्यादा

maryada

Ramayana — Rama's dharma

Sacred Boundaries — Rama Maryada Purushottam

Concurrency limiter for LLM agents. Max parallel calls, queue depth, backpressure.

Python Zero Dependencies Vedic Arsenal License

Formerly agent-limiter — Part of the Vedic Arsenal: 100 production-grade Python libraries for LLM agents, each named from the Vedas, Puranas, and Mahakavyas.


The Vedic Principle

Ram is called Maryada Purushottam — the supreme upholder of sacred limits. He never exceeded his dharmic boundaries, even when it would have been easier to do so.

maryada brings this principle to LLM rate limiting. The sacred boundary — tokens per minute, requests per hour, cost per day — is not a constraint. It is dharma. Exceeding it is adharma, causing harm to the entire system.

The token bucket, the sliding window, the ModelLimits presets — these are Ram's maryada, drawn around your API calls to protect not just your system, but the shared infrastructure that all agents depend upon.


How It Works

flowchart LR
    A[API Call] --> B[maryada limiter]
    B --> C{Tokens Available?}
    C -- Yes --> D[Allow + Consume]
    C -- No --> E{Wait or Reject?}
    E -- Wait --> F[Sleep + Retry]
    E -- Reject --> G[429 Error]
    style B fill:#3b82f6,color:#fff
Loading

Installation

pip install maryada

Or from source:

git clone https://github.com/darshjme/maryada.git
cd maryada && pip install -e .

Quick Start

from maryada import *

# See examples/ for full usage

The Vedic Arsenal

maryada is one of 100 libraries in darshjme/arsenal — each named from sacred Indian literature:

Sanskrit Name Source Technical Function
maryada Ramayana — Rama's dharma Sacred Boundaries — Rama Maryada Purushottam

Each library solves one problem. Zero external dependencies. Pure Python 3.8+.


Contributing

  1. Fork the repo
  2. Create feature branch (git checkout -b fix/your-fix)
  3. Add tests — zero dependencies only
  4. Open a PR

🌊 Built by Darshankumar Joshi · @thedarshanjoshi

"कर्मण्येवाधिकारस्ते मा फलेषु कदाचन" Your right is to action alone, never to its fruits. — Bhagavad Gita 2.47

Vedic Arsenal · GitHub · Twitter

About

Token and cost limiting for LLM agents — TokenBudget, CostBudget, sliding window rate limiter. Zero dependencies.

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages