Skip to main content

pycsn

Python package supporting cds for table definitions in the first place. The data type is a dict and therefore using csn/json as the primary formatn from which a cds-document can be created.

Use cases:

  • Commandline: creating csn-file from csv-file that can be then adjusted
  • Use package for creating a csn-file in a python script, e.g.
    1. Create csn from pd.DataFrame with index as primary keys
    2. Add annotations

Commandline

usage: pycsn [-h] [filename] [csn]

Creates csn-file from pandas DataFrame.

positional arguments:
  filename    Data Filename (csv) or folder (delta)
  csn         csn-file (optional)

options:
  -h, --help  show this help message and exit

PyPI - Version PyPI - Python Version


Table of Contents

Installation

pip install pycsn

For testing

Install cds

Install the cds cli tool "cds-dk"

npm add -g @sap/cds-dk

Local Database

Because the final destination of a table is HANA, you should test if the resulting sql-statement (CREATE TABLE) works. sqlite is recommended by SAP CAP.

For MacOs:

brew install sqlite

Testing

pyscn is using a dict a its primary data format.

Example Data

table : store columns : transaction_id: store_id:

License

pycsn is distributed under the terms of the MIT license.

Metadata

Release files for pycsn 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pycsn 0.0.2
File Size Uploaded Provenance
pycsn-0.0.2.tar.gz 85.8 kB Without provenance Details

Release files / pycsn-0.0.2.tar.gz

Download URL pycsn-0.0.2.tar.gz
Size 85.8 kB
Tags Source
SHA-256 checksum
How to use checksums
aa1b35473a272fd04b98bd2ce5f3bf5c8aefa90df0a74233cabeb205cadda7cc
BLAKE2b-256 checksum
How to use checksums
60a1a5c79b2b19adf69f834dc9e518ba50c9ec10873d505738bcac786dc1003c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for pycsn 0.0.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.

Release history Release notifications | RSS feed

This release

0.0.2 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page