Skip to main content

Mycelium CLI

What is Mycelium?

Mycelium is a framework that helps you easily write highly scalable (microservice) applications.

Mycelium automatically generates Terraform from your code, and handles load balancing for you.

The goal is to write your code without thinking about the infrastructure as if it was a simple monolithic application, and then have Mycelium decide on how to split your app into components, handle load balancing, communication between components, etc...

How to use Mycelium?

Import this runtime library into your app and use it to annotate your code with service hints/constraints.

The more this framework evolves, the less help you will have to give in the form annotations.

Finally, invoke this CLI (myc command) and watch it automatically generate Terraform for you (and optionally deploy it for you).

Example Usage

Create an empty Poetry application with myc (runtime) as dependency and myccli (compiler) as a development dependency.

Add some package (e.g. test_app) to your project with __init__.py containing:

from myc import Mycelium

app = Mycelium()
foo_service = app.create_service("foo")
bar_service = app.create_service("bar")

@foo_service.fastapi.get("/")
def foo():
    return f'The answer is: {bar()}'

@bar_service.fastapi.get("/")
def bar():
    return 42

Then run myc compile test_app:app to generate Terraform, followed by myc deploy to deploy your app!

What will happen:

  • A Dockerfile will be generated for each service
  • Docker images will be built and pushed to a private ECR repository
    • Temporary caveat: The framework expects you to have a repository called mycelium in your AWS region of choice (an update will come soon to have this repo created automatically)
  • Two ECS services will be created in a new cluster for foo and bar services.
  • The call to bar() in foo function will be transformed to an HTTP get request!

Limitations

This project is in its earliest stages, and feature count is limited at the moment. The framework (currently) assumes projects to use Poetry as a package manager

Currently supported features:

  • AWS as a cloud provider
  • ECS as a platform in AWS (Lambda support will come very soon)
  • Poetry as the package manager

More will come soon!

Upcoming Features

  • Dynamic and static load measurements to determine optimal load balancing strategy
  • Support more cloud providers: Google Cloud, Azure, etc...
  • Support more service platforms: AWS Lambda, EC2, etc...
  • Support more package managers other than Poetry
  • Flexible serialization/deserialization strategies
  • Command to launch dashboard to watch:
    • Service topology
    • Aggregated logs
    • Load balancing metrics

Metadata

Release files for myccli 0.1.4

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

Source distribution (sdist)

Source distribution for myccli 0.1.4
File Size Uploaded Provenance Actions
myccli-0.1.4.tar.gz 40.9 kB Without provenance Details for myccli-0.1.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for myccli 0.1.4
File Interpreter ABI Platform Actions
myccli-0.1.4-py3-none-any.whl Python 3 none any Details for myccli-0.1.4-py3-none-any.whl

Total release size: 67.6 kB

Release files / myccli-0.1.4.tar.gz

Download URL myccli-0.1.4.tar.gz
Size 40.9 kB
Tags Source
SHA-256 checksum
How to use checksums
4b81b6625fb933d4d6b59b20913a0403e1cc5e66d1dd774a41a8b7d8056c70b9
BLAKE2b-256 checksum
How to use checksums
d7ab9b2b71f5fb37fd52bb0233390f1f7c84a1e758ee72ba13154aa882d2db8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.4 Linux/5.15.0-25-generic

Release files / myccli-0.1.4-py3-none-any.whl

Download URL myccli-0.1.4-py3-none-any.whl
Size 26.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6eff81673ee3faad7136a3f801b3560a969d836351710cb05be6244194bc7c7f
BLAKE2b-256 checksum
How to use checksums
52778c58a5444d3fe1566c8f8895cb9e7e9da375afbf36065c846fb25b12ed29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.0 CPython/3.10.4 Linux/5.15.0-25-generic

Security for myccli 0.1.4

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.

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files No provenance

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