Python bindings for Markdown CSV Document packages.
Project description
mcd Python bindings
Rust-backed Python bindings for Markdown CSV Document packages.
Install the PyPI distribution:
pip install mcdee
Released builds include prebuilt wheels for common Windows, macOS, and Linux machines. To require a wheel and avoid local Rust/C compiler builds:
pip install --only-binary=:all: mcdee
The distribution name is mcdee; the Python import package is mcd.
import mcd
doc = mcd.open("report.mcd")
validation = doc.validate()
blocks = doc.blocks()
table = doc.table("revenue")
markdown = doc.markdown(expand_tables=True)
external_data = doc.external_data()
provenance = doc.provenance()
relationships = doc.relationships()
Use query() for SQLite-backed table analysis. Package table IDs are available
as SQL table names, and MCD schema metadata is exposed through runtime tables:
doc.query("select table_id, column_name from mcd_primary_keys").rows
doc.query("""
select table_id, column_name, ref_table_id, ref_column_name
from mcd_foreign_keys
""").rows
doc.query("select table_id, column_name, unit_code from mcd_units").rows
SQLite PRAGMA introspection works through read-only select queries:
doc.query("select name, pk from pragma_table_info('revenue') where pk > 0").rows
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file mcdee-0.1.0a1.tar.gz.
File metadata
- Download URL: mcdee-0.1.0a1.tar.gz
- Upload date:
- Size: 102.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b608776199dd67e7df009eaee2415d450f80431d44fe7aa627869569afda57c9
|
|
| MD5 |
cc8d78e088c8e692526d816a29085164
|
|
| BLAKE2b-256 |
0a4629087db4494a50495b8c598d7062baec6681eaa1f86fc02f5201c78a0841
|
File details
Details for the file mcdee-0.1.0a1-cp39-abi3-win_amd64.whl.
File metadata
- Download URL: mcdee-0.1.0a1-cp39-abi3-win_amd64.whl
- Upload date:
- Size: 4.7 MB
- Tags: CPython 3.9+, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6482fd960e16c9487ad58776b84777777c443e10c8a6796fef13f8987d0a25aa
|
|
| MD5 |
f164032932640afe0f42dc99b48001ba
|
|
| BLAKE2b-256 |
4a048ae71df8d9c6bc6335f502e0c38e2bf6bdac62a12122a39e1e2a92aedcef
|