Skip to main content

No project description provided

Project description

Modulith

Build once. Deploy effortlessly. Run everywhere

Modulith lets you focus on your application logic, not deployment infrastructure. Structure your code as modules with defined capabilities, then serve or deploy them on any machine without worrying about the underlying infrastructure. Whether you're running locally for development or scaling across the cloud, your interface stays consistent and your modules remain reusable.

🚀 What You Get

  • 🧱 Scalable by design — move from local → distributed seamlessly
  • 🔗 Composable — build systems by combining modules, local or remote
  • 🌐 Shareable — publish and reuse modules across projects
  • 🔐 Built-in access control — rate limits, burst limits, auth tokens

📦 Install

pip install modulith

🚀 Quick Start

Define a module and run it locally:

# calculator/module.py
from modulith import Modulith

module = Modulith("calculator")

@module.capability("add")
def add(a: float, b: float) -> float:
    return a + b

result = module.add(a=1, b=2) # → 3

🐳 Deploy effortlessly

Modulith abstracts away deployment complexity. With a single command, you can deploy your module with built-in access controls, monitoring, automatic scaling. Let's you fully focus on your application logic, not the underlying infrastructure:

modulith deploy 
--source calculator.module \    
--public \                     
--rate-limit 100 \             
--burst-limit 20 

You'll see:

🔑 Your authentication token: ...

🌐 Module 'calculator' is live:
- Repository: <your_username>/calculator
- Public URL: ...

⚙️ Capabilities:
- add(a: float, b: float) → float

⚡ Public access limits:
- Rate limit: 100 requests/minute
- Burst limit: 20 requests

🌐 Run Everywhere

Now you can access your module from any machine:

calculator = Modulith.remote(
    "<your_username>/calculator",
    access_token="..."
)
result = calculator.add(a=1, b=2) # → 3 (executed remotely)

Same interface. Local or remote, no difference.

🔗 Composing Modules

Build new modules on top of existing modules:

new_module = Modulith()
calculator = Modulith.remote("<your_username>/calculator", access_token="...")

@new_module.capability("double_sum")
def double_sum(a: float, b: float) -> float:
    sum1 = calculator.add(a, b)
    sum2 = calculator.add(a, b)
    return sum1 + sum2

result = new_module.double_sum(a=1, b=2) #  → 6

Execution flow:

double_sum(1, 2)
  → add(1, 2)   [remote]  → 3
  → add(1, 2)   [remote]  → 3
  → 3 + 3                 → 6

👤 Account (Optional)

Skip manual token management by linking modules to your account:

modulith signup # Create an account
modulith login

Once logged in, your module is automatically registered under your username:

🌐 Module 'calculator' is live:
- Repository: <your_username>/calculator
...

CLI Reference

Command Description
modulith signup Create a new account and get an authentication token
modulith login Log in to your account and store the authentication token securely
modulith deploy Deploy module
modulith monitor Monitor module usage
modulith stop Stop a running module
modulith start Start a stopped module
modulith rm Remove a module

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

modulith-0.1.8.tar.gz (40.3 kB view details)

Uploaded Source

Built Distribution

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

modulith-0.1.8-py3-none-any.whl (66.0 kB view details)

Uploaded Python 3

File details

Details for the file modulith-0.1.8.tar.gz.

File metadata

  • Download URL: modulith-0.1.8.tar.gz
  • Upload date:
  • Size: 40.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for modulith-0.1.8.tar.gz
Algorithm Hash digest
SHA256 1e1b9ea68d38c149f3a4dc01e2dee3eeaa371797386277d78069f414041dabcf
MD5 69522ae1fcd62a5f5da69cf1baa15a42
BLAKE2b-256 5ffd70d24bbbc2e3cd3027b0a203ac69e014d42141cbfe926df89b9e1cc8f00c

See more details on using hashes here.

Provenance

The following attestation bundles were made for modulith-0.1.8.tar.gz:

Publisher: python-publish.yml on modulith-labs/modulith

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file modulith-0.1.8-py3-none-any.whl.

File metadata

  • Download URL: modulith-0.1.8-py3-none-any.whl
  • Upload date:
  • Size: 66.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for modulith-0.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 1676350560b1f958712f9ed21a63c2d9e12015bdf1da1e7db7bbed9b91df36de
MD5 bdaa9b06ba674cb98dd06df441980e3a
BLAKE2b-256 50bbe975aba0c9c2fa1170aa9bdc76f658a9bc991ccae6dbe2c96adfc0cdba92

See more details on using hashes here.

Provenance

The following attestation bundles were made for modulith-0.1.8-py3-none-any.whl:

Publisher: python-publish.yml on modulith-labs/modulith

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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