Skip to main content

DataFrames all up in your web applications

Project description


Frameup is the easiest way to get your Pandas DataFrame up into a Python-based web application. Simply import frameup and your DataFrames will become URL query parameter, and pagination aware.

Zero dependencies, except Pandas of course.

Quick look

Serve a csv as a frameup dataframe on localhost

 $ python -m frameup.serve <path-to-csv-file>

Then navigate to http://localhost:8000/. Use the Pandas DataFrame query syntax in the query box.

... or, get a JSON payload:

 $ curl 'http://localhost:8000/?query=&limit=10&page=1' | python -m json.tool

Use it in your web application

Flask example

Given a template similar to example.js.html

from flask import Flask, jsonify, render_template, request, url_for
import pandas as pd
import frameup

app = Flask(__name__)

df = pd.read_csv(YOUR_CSV_FILE)

def main():
    data ='mydataframe'), **request.args)
    return render_template('example.j2.html', **data)

For something ajaxy, just replace the return with:

return jsonify(**data)

Other projects

Projects to review / learn from / use instead

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

frameup-0.1.1.tar.gz (5.7 kB view hashes)

Uploaded Source

Built Distribution

frameup-0.1.1-py3-none-any.whl (7.8 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