Skip to main content

The easiest way to run python code on one or more remote machines

Project description

Meadowrun

PyPI - Python Version PyPI PyPI - Downloads Conda Conda

Join the chat at https://gitter.im/meadowdata/meadowrun

Meadowrun is a library for data scientists and data engineers who run python code on AWS, Azure, or Kubernetes. Meadowrun:

  • scales from a single function to thousands of distributed tasks.
  • syncs your local code and libraries for a faster, easier iteration loop. Edit your code and rerun your analysis without worrying about building packages or Docker images.
  • optimizes for cost, choosing the cheapest instance types and turning them off when they're no longer needed.

For more context, see our case studies of how Meadowrun is used in real life, or see the project homepage

To get started, go to our documentation, or join the chat on Gitter

Quickstart

First, install Meadowrun using pip:

pip install meadowrun

Next, assuming you've configured the AWS CLI and are a root/administrator user, you can run:

import meadowrun
import asyncio

print(
    asyncio.run(
        meadowrun.run_function(
            lambda: sum(range(1000)) / 1000,
            meadowrun.AllocEC2Instance(),
            meadowrun.Resources(logical_cpu=1, memory_gb=8, max_eviction_rate=80),
            meadowrun.Deployment.mirror_local()
        )
    )
)

The documentation has examples of how to use other package managers (conda, poetry), and other platforms (Azure, GKE, Kubernetes).

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

meadowrun-0.2.16.tar.gz (279.2 kB view hashes)

Uploaded Source

Built Distribution

meadowrun-0.2.16-py3-none-any.whl (345.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page