No project description provided
Project description
pydacharts
Pydantic :heart: chartjs This is a code generator for ChartJS configuration JSON.
Set Up
- Pip install the package with
pip install pydacharts
or clone the repo - Use the class generator to write a "config" file. One simple example
from pydacharts.models import Config, Data, Dataset
def spending_by_year_chartjs() -> Config:
"""
Return a chartjs "config" object for sip dataset
charting
"""
return Config(
type="bar",
data=Data(
labels=["Green is nice", "Red is angry", "Blue is calming"],
datasets=[Dataset(
backgroundColor = ["green", "red", "blue"],
data = [1,2,3],
label = "We love colors"
)]
)
)
(This example should work standalone)
For running examples
Run Examples
pip install flask
cd serve
flask run
go to localhost:5000
Building
poetry build
poetry version patch # or "major", "minor"
poetry publish
Developing
Clone in editable
mode
pip install -e git+git://github.com/joshbrooks/pydacharts/#egg=pydacharts
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
pydacharts-0.1.4.tar.gz
(23.9 kB
view hashes)
Built Distribution
pydacharts-0.1.4-py3-none-any.whl
(25.9 kB
view hashes)
Close
Hashes for pydacharts-0.1.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 871d9c3bfc4d903c79ae822b1b53dc556762a0b8f5bff77ec8348da501bdb61a |
|
MD5 | d8ba38f4c0b62b11bdda6aa14f25dcf2 |
|
BLAKE2b-256 | 91f05aec1e48efefa41fb1e7bef8312b3cd768f78e711607ce1ee4b2678b1934 |