Skip to main content

DNA: A domain-specific language (transcription between UTF-8 and binary) based on YAML.

Project description

logo

DNA

GitHub Actions Workflow Status GitHub last commit PyPI - Python Version PyPI - Version PyPI - Wheel PyPI - Downloads GitHub License

A domain-specific language (transcription between UTF-8 and binary) based on YAML.

Installation

DNA can be installed from PyPI:

pip install dnadsl

or download the repository and run:

pip install .

as of the repository root folder.

Usage

Run dna --help for help:

$ dna --help
usage: dna [-h] [-i INPUT_FILE] [-o OUTPUT_FILE] [-v] [path]

+------------------------------------------+
|                    DNA                   |
|        A domain-specific language        |
| (transcription between UTF-8 and binary) |
|              based on YAML.              |
+------------------------------------------+

positional arguments:
  path                  The path of the input YAML file.

options:
  -h, --help            show this help message and exit
  -i INPUT_FILE, --input-file INPUT_FILE
                        The path of the input YAML file.
  -o OUTPUT_FILE, --output-file OUTPUT_FILE
                        The path of the output YAML file.
  -v, --version         Print the version number of dna and exit.

Examples

  • The input YAML file:

    text_utf8: ❤️🐶
    
  • The output YAML file:

    text_utf8: ❤️🐶
    dna:
    positive_strand:
        sequence: TGAGGCTCGGCATGTTGTGAGATTTTAAGCTTGCAAGTCG
        binary: 11100010 10011101 10100100 11101111 10111000 10001111 11110000 10011111
        10010000 10110110
        text: ❤️🐶
    negative_strand:
        sequence: ACTCCGAGCCGTACAACACTCTAAAATTCGAACGTTCAGC
        binary: 00011101 01100010 01011011 00010000 01000111 01110000 00001111 01100000
        01101111 01001001
        text: "\x1Db[\x10Gp\x0F`oI"
    

Packaging

The binaries are created with PyInstaller:

# Package it on Linux
pyinstaller --name DNA --onefile -p dna dna/__main__.py

# Package it on Windows
pyinstaller --name DNA --onefile --icon python.ico -p dna dna/__main__.py

Copyrights

DNA is a free, open-source software package (distributed under the GPLv3 license). The logo used in README.md is downloaded from Wikimedia Commons. The Python icon is downloaded from python.ico.

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

dnadsl-0.2.0.tar.gz (16.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dnadsl-0.2.0-py3-none-any.whl (18.2 kB view details)

Uploaded Python 3

File details

Details for the file dnadsl-0.2.0.tar.gz.

File metadata

  • Download URL: dnadsl-0.2.0.tar.gz
  • Upload date:
  • Size: 16.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dnadsl-0.2.0.tar.gz
Algorithm Hash digest
SHA256 abfa9ea96f2713191d9f818a775ba0c4d673e87ec727110759813ae05ceb9407
MD5 accd1a5534c2609936fe4c68f4e5432e
BLAKE2b-256 0e03063bdcb0b1562b9b64a0c47a4e1545865ca43321ca58951bfaacb7c08bb6

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnadsl-0.2.0.tar.gz:

Publisher: python-publish.yml on project-aico/dna

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dnadsl-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: dnadsl-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 18.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dnadsl-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 531e85d221605792301e6071c9cd56bcb62d0243bc1c884e43e3cd73c803a297
MD5 c67d52a2544807a0ea35f36cfa01be8b
BLAKE2b-256 9453cc7e6289b81c08dc8cc1f6be6d3b4793b5baa47614ee06ebde6347c7edae

See more details on using hashes here.

Provenance

The following attestation bundles were made for dnadsl-0.2.0-py3-none-any.whl:

Publisher: python-publish.yml on project-aico/dna

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page