Skip to main content

Normalize and serialize a Tabular Application Profile.

Test Status Documentation Status Code style: black

Documentation

Installation

To work correctly, “dctap” requires Python 3.7 or higher. Executing the command python3 should show you if Python 3 is installed on your machine and in which version.

As explained below, the command-line utility can be installed either from the online PyPI repository, using the pip command, or from a local copy of the project on your own machine.

Installation from PyPI

Installing with “pip” pulls the most recently published version of the project from the PyPI repository with the following command:

python3 -m pip install dctap

or uninstalled with:

python3 -m pip uninstall dctap

Installation from Github

“dctap” can be installed directly from Github with:

python3 -m pip install -U https://github.com/dcmi/dctap-python/archive/main.zip

Installing “dctap” this way, and periodically re-running this command to refresh, is the best way to keep up with the latest version of “dctap”.

Installation with pip in virtual environment

For developers who work alot with Python projects, it is good practice to create and activate a virtual environment so that “dctap”, and its dependencies, will not be installed into the global Python environment on your machine. The virtual environment is held in a directory of your choice; in the example below, a hidden directory .venv is created in some_directory (your current working directory), and the virtual environment is activated by executing source .venv/bin/activate.

$ python3 -m venv .venv
$ source .venv/bin/activate
$ python3 -m pip install -U https://github.com/dcmi/dctap-python/archive/main.zip

Note that “dctap” will pip-install even without creating and activating a virtual environment, even though this is not considered good practice. If you do install it into a virtual environment, note that the virtual environment must be activated with source .venv/bin/activate or “dctap” will not work. The activation of a virtual environment can be automated by adding this command to a shell profile where it will be executed when starting the shell, for example by adding the lines to the file “~/.bash_profile”:

cd /Users/foo/somedirectory
source .venv/bin/activate

Installation from a local clone of Git repository

Cloning the “dctap-python” repository to your machine and installing it from the dctap-python directory is a good option if you want to keep up-to-date with the latest developments in the project. The following commands install “dctap” for the first time. In order to refresh the project directly from the project repository, you can at any time execute git pull (from within the repository), which will install the latest features and bug fixes in your local copy.

$ git clone https://github.com/dcmi/dctap-python.git
$ cd dctap-python
$ python -m venv .venv
$ source .venv/bin/activate
$ python3 -m pip install flit Pygments
$ flit install -s

Quick start

Run without arguments, “dctap” shows what options and commands are available.

$ dctap
Usage: dctap [OPTIONS] COMMAND [ARGS]...

  DC Tabular Application Profiles (DCTAP) - base module

  Examples:

  $ dctap generate my_profile.csv
  $ dctap generate --json my_profile.csv
  $ dctap generate --expand-prefixes my_profile.csv
  $ dctap generate --warnings my_profile.csv
  $ dctap generate --warnings --expand-prefixes --json my_profile.csv
  $ dctap init
  Built-in settings written to dctap.yml - edit as needed.
  $ dctap init /Users/tbaker/dctap.yml
  Built-in settings written to /Users/tbaker/dctap.yml - edit as needed.
  $ dctap generate --configfile /Users/tbaker/dctap.yml

Options:
  --version  Show version and exit
  --help     Show help and exit

Commands:
  generate  Generate normalized text, JSON, or YAML of CSV, with warnings.
  init      Generate customizable configuration file [default: dctap.yml].

For more information, see the documentation on readthedocs.io.

Metadata

Release files for dctap 0.4.5

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

Source distribution (sdist)

Source distribution for dctap 0.4.5
File Size Uploaded
dctap-0.4.5.tar.gz 65.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dctap 0.4.5
File Interpreter ABI Platform
dctap-0.4.5-py3-none-any.whl Python 3 none any Details

Total release size: 82.1 kB

Release files / dctap-0.4.5.tar.gz

Download URL dctap-0.4.5.tar.gz
Size 65.2 kB
Tags Source
SHA-256 checksum
How to use checksums
aadd267a58366018a64ac21509df39d813ecacaad862f84ff084227434636d6f
BLAKE2b-256 checksum
How to use checksums
f840d0b3bae32bb181c575dfb45500c05d1999b3c58d7794d5c4ebd785830854
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Release files / dctap-0.4.5-py3-none-any.whl

Download URL dctap-0.4.5-py3-none-any.whl
Size 16.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0be8d2094feb72ef9a2e9f0a8def84ef8508506aabd89b55add96ccc02fffe4c
BLAKE2b-256 checksum
How to use checksums
52fa161a09bde65426ebee533a64e00b9bfa69d650fd4a2b268db5f9d2098d1d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via python-requests/2.28.2

Release history Release notifications | RSS feed

This release

0.4.5 This release

2 release files

0.4.4

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.15

2 release files

0.3.14

2 release files

0.3.13

2 release files

0.3.12

2 release files

0.3.11

2 release files

0.3.10

2 release files

0.3.9

2 release files

0.3.7

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2

2 release files

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