Skip to main content

Mage is a notebook for building and deploying data pipelines.

Project description

PyPi mage-ai License Join Slack

Intro

Mage is an open-source notebook for building and deploying data pipelines.

Mage

A data pipeline defined across 3 different files:

# load_data_from_file.py
from pandas import DataFrame
import pandas as pd


@data_loader
def load_data() -> DataFrame:
    return pd.read_csv('default_repo/titanic.csv')
# select_columns.py
from pandas import DataFrame


@transformer
def transform_df(df: DataFrame, *args) -> DataFrame:
    return df[['Age', 'Fare', 'Survived']]
# export_to_file.py
from pandas import DataFrame


@data_exporter
def export_data(df: DataFrame) -> None:
    return df.to_csv('default_repo/titanic_transformed.csv')

What the data pipeline looks like in the UI:

data pipeline overview

New? We recommend reading about blocks and learning from a hands-on tutorial.

Join us on Slack

Table of contents

  1. Quick start
  2. Tutorials
  3. Features
  4. Contributing
  5. Community
  6. Documentation

🏃‍♀️ Quick start

Fire mage

You can install Mage using Docker or pip:

Using Docker

Create a new project and launch tool (change demo_project to any other name if you want):

docker run -it -p 6789:6789 -v $(pwd):/home/src \
  mageai/mageai mage start demo_project

Open http://localhost:6789 in your browser and build a pipeline.

Follow the guide if you want to use PySpark kernel in your notebook.

Using pip

1. Install Mage
pip install mage-ai

Mage also has the following extras:

  • spark: to use Spark in your Mage pipeline
  • bigquery: to connect to BigQuery for data import or export
  • hdf5: to process HDF5 file format
  • postgres: to connect to PostgreSQL for data import or export
  • redshift: to connect to Redshift for data import or export
  • s3: to connect to S3 for data import or export
  • snowflake: to connect to Snowflake for data import or export
  • all: to install all of the above to use all functionalities
pip install "mage-ai[spark]"

You may need to install development libraries for MIT Kerberos to use some Mage features. On Ubuntu, this can be installed as:

apt install libkrb5-dev
2. Create new project and launch tool

(change demo_project to any other name if you want):

mage start demo_project

Open http://localhost:6789 in your browser and build a pipeline.

👩‍🏫 Tutorials


🔮 Features

  1. Data centric editor
  2. Production ready code
  3. Extensible

1. Data centric editor

An interactive coding experience designed for preparing data to train ML models.

Visualize the impact of your code every time you load, clean, and transform data.

Data centric editor

2. Production ready code

No more writing throw away code or trying to turn notebooks into scripts.

Each block (aka cell) in this editor is a modular file that can be tested, reused, and chained together to create an executable data pipeline locally or in any environment.

Read more about blocks and how they work.

Production ready code

Run your data pipeline end-to-end using the command line function: $ mage run [project] [pipeline]

You can run your pipeline in production environments with the orchestration tools

3. Extensible

Easily add new functionality directly in the source code or through plug-ins (coming soon).

Adding new API endpoints (Tornado), transformations (Python, PySpark, SQL), and charts (using React) is easy to do (tutorial coming soon).

Extensible charts

New features and changelog

Check out what’s new here.

🙋‍♀️ Contributing

We welcome all contributions to Mage; from small UI enhancements to brand new cleaning actions. We love seeing community members level up and give people power-ups!

Check out the 🎁 contributing guide to get started by setting up your development environment and exploring the code base.

Got questions? Live chat with us in Slack Slack

Anything you contribute, the Mage team and community will maintain. We’re in it together!

🧙 Community

We love the community of Magers (/ˈmājər/); a group of mages who help each other realize their full potential!

To live chat with the Mage team and community, please join the free Mage Slack Slack channel.

Join us on Slack

For real-time news and fun memes, check out the Mage Twitter Twitter.

To report bugs or add your awesome code for others to enjoy, visit GitHub.

🪪 License

See the LICENSE file for licensing information.


Wind mage casting spell

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mage-ai-0.2.10.tar.gz (6.1 MB view details)

Uploaded Source

Built Distribution

mage_ai-0.2.10-py3-none-any.whl (6.2 MB view details)

Uploaded Python 3

File details

Details for the file mage-ai-0.2.10.tar.gz.

File metadata

  • Download URL: mage-ai-0.2.10.tar.gz
  • Upload date:
  • Size: 6.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for mage-ai-0.2.10.tar.gz
Algorithm Hash digest
SHA256 2db650ac5143dfd8e70e76593667958f9d968c9a597e2fbd05bbb5b404ebc859
MD5 28bcb6692f31231dc66ed12e8d5103d3
BLAKE2b-256 1e3d49ef87971af4dcdc68d40d0a75986ff532ce615a2a6e52a9bf62cae274dd

See more details on using hashes here.

File details

Details for the file mage_ai-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: mage_ai-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 6.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for mage_ai-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 4b0c1eb97c78392dd99411ad1cac0be7bf5a763315e2fac01d74c423c8dd900a
MD5 833758dcd960cac9ed8546eaed3104d6
BLAKE2b-256 80f441590af574b68da2cc255298d9e103554338f0d7768b43625951df88131e

See more details on using hashes here.

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