What is Meerschaum?
Meerschaum is a tool for quickly synchronizing time-series data streams called pipes. With Meerschaum, you can have a data visualization stack running in minutes.
Why Meerschaum?
Two words: incremental updates. Fetch the data you need, and Meerschaum will handle the rest.
If you've worked with time-series data, you know the headaches that come with ETL.
Data engineering often gets in analysts' way, and when work needs to get done, every minute spent on pipelining is time taken away from real analysis.
Rather than copy / pasting your ETL scripts, simply build pipes with Meerschaum! Meerschaum gives you the tools to design your data streams how you like โ and don't worry โ you can always incorporate Meerschaum into your existing systems!
Want to Learn More?
You can find a wealth of information at meerschaum.io!
Additionally, below are several articles published about Meerschaum:
Installation
For a more thorough setup guide, visit the Getting Started page at meerschaum.io.
TL;DR
pip install -U --user meerschaum
mrsm stack up -d db grafana
mrsm bootstrap pipes
Usage
Please visit meerschaum.io for setup, usage, and troubleshooting information. You can find technical documentation at docs.meerschaum.io, and here is a complete list of the Meerschaum actions.
CLI
mrsm install plugin noaa
mrsm register pipe -c plugin:noaa -m weather -l atl -i sql:local
mrsm sync pipes -l atl -i sql:local
Python API
import meerschaum as mrsm
pipe = mrsm.Pipe(
'foo', 'bar',
target = 'MyTableName!',
instance = 'sql:local',
columns = {
'datetime': 'dt',
'id' : 'id',
},
)
pipe.sync([{'dt': '2022-07-01', 'id': 1, 'val': 10}])
pipe.sync([{'dt': '2022-07-01', 'id': 1, 'val': 10}])
assert len(pipe.get_data()) == 1
pipe.sync([{'dt': '2022-07-01', 'id': 1, 'val': 100}])
assert len(pipe.get_data()) == 1
df = pipe.get_data(
begin = '2022-01-01',
end = '2023-01-01',
params = {'id': [1]},
)
pipe.delete()
Simple Plugin
__version__ = '1.0.0'
required = ['requests']
def register(pipe, **kw):
return {
'columns': {
'datetime': 'dt',
'id' : 'id',
},
}
def fetch(pipe, **kw):
import requests, datetime, random
response = requests.get('http://date.jsontest.com/')
data = response.json()
timestamp = datetime.datetime.fromtimestamp(
int(str(data['milliseconds_since_epoch'])[:-3])
)
return [{
"dt" : timestamp,
"id" : random.randint(1, 4),
"value": random.uniform(1, 100),
}]
Features
- ๐ Built for Data Scientists and Analysts
- Integrate with Pandas, Grafana and other popular data analysis tools.
- Persist your dataframes and always get the latest data.
- โก๏ธ Production-Ready, Batteries Included
- ๐ Easily Expandable
- โจ Tailored for Your Experience
- Rich CLI makes managing your data streams surprisingly enjoyable!
- Web dashboard for those who prefer a more graphical experience.
- Manage your database connections with Meerschaum connectors.
- Utility commands with sensible syntax let you control many pipes with grace.
- ๐ผ Portable from the Start
- The environment variable
$MRSM_ROOT_DIR
lets you emulate multiple installations and group together your instances. - No dependencies required; anything needed will be installed into a virtual environment.
- Specify required packages for your plugins, and users will get those packages in a virtual environment.
Support Meerschaum's Development
For consulting services and to support Meerschaum's development, please considering sponsoring me on GitHub sponsors.
Additionally, you can always buy me a coffeeโ!
License
Copyright 2021 Bennett Meares
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.