DataFrameup
$ pip install frameup
$ frameup <path-to-csvfile>
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)
@app.route('/mydataframe')
def main():
data = df.frameup.data(path=url_for('main'), **request.args)
return render_template('example.j2.html', **data)
For something ajaxy, just replace the return with:
return jsonify(**data)
On query parameter objects
Be sure the query parameter object you pass frameup does not return lists for values. classes is the only multi-valued parameter accepted, and should be passed as a comma-delimited list rather than multiple classes keys.
Python web frameworks all have their own way of dealing with the vagaries of GET parameter specification hell. Most implement some concept of a MultiDict, but the APIs for these vary from one framework to the next. Thus, the requirement of only single-valued GET params greatly simplifies things here.
Other projects
Projects to review / learn from / use instead
Metadata
Release files for frameup 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| frameup-0.1.2.tar.gz | 6.0 kB | Without provenance | Details for frameup-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frameup-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for frameup-0.1.2-py3-none-any.whl |
Total release size: 14.1 kB
Release files / frameup-0.1.2.tar.gz
| Download URL | frameup-0.1.2.tar.gz |
|---|---|
| Size | 6.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6128c60917b5cdd6a3f714382970ed45cf8ac48473d0b94e949a8d00e531dbca
|
|
BLAKE2b-256 checksum How to use checksums |
4704e7c7437710967d8a583c01c2590a58189d4c95b13f553b3e77963c5c07c5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.7.2 Darwin/18.7.0
|
Release files / frameup-0.1.2-py3-none-any.whl
| Download URL | frameup-0.1.2-py3-none-any.whl |
|---|---|
| Size | 8.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
61dec0558391ddbb39444c92dde33872e4652be58cd1b3d8c4e5642eef3079bc
|
|
BLAKE2b-256 checksum How to use checksums |
356dcfdb5939a55db4cb45a06a1e24c204914b92bd0994cd0345887af9288c2e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/0.12.17 CPython/3.7.2 Darwin/18.7.0
|
Security for frameup 0.1.2
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.