Skip to main content

ASCII art generator for science-themed visuals

Project description

Sciencii

Build Status

A Python package that generates science-themed ASCII art — DNA helices, pipettes, periodic table element cards, test tubes, and molecule-style text captions.

PyPI: https://pypi.org/project/sciencii/

Installation

pip install sciencii

Usage

dna_helix(length)

Generates an ASCII DNA double helix. length is the number of 5-line cycles to repeat.

from sciencii import dna_helix

print(dna_helix(1))
O---o
 O-o
  O
 o-O
o---O

pipette(volume, max_volume)

Draws an ASCII pipette filled proportionally. volume is the current fill level, max_volume is the capacity.

from sciencii.pipette import pipette

print(pipette(5, 10))

get_element(name)

Looks up an element by name, symbol, or atomic number and shows its ASCII art card. Pass "table" for the full periodic table.

import sciencii.periodic_table as periodic_table

periodic_table.get_element("He")
periodic_table.get_element(79)
periodic_table.get_element("table")

test_tube(fill_level, label)

Draws an ASCII test tube filled proportionally. fill_level is a number from 0 to 100 representing the percentage filled, and label is a string displayed below the tube.

from sciencii import test_tube

print(test_tube(75, "Sample A"))
|   |
|   |
|   |
|###|
|###|
|###|
|###|
|###|
|###|
|###|
|___|
Sample A

molecule_caption(text, style)

Draws text in a science-themed ASCII style. style can be "flask", "beaker", "atom", or "bond".

from sciencii import molecule_caption

print(molecule_caption("H2O", "flask"))
print(molecule_caption("NaCl", "beaker"))
print(molecule_caption("Fe", "atom"))
print(molecule_caption("CO2", "bond"))

Example Program

See example.py for a runnable program that demonstrates every function.

python example.py

For Developers

Setup

Requires Python 3.9+ and pipenv (pip install pipenv).

git clone https://github.com/swe-students-spring2026/3-package-red_panda.git
cd 3-package-red_panda
pipenv install --dev

Run tests

pipenv run pytest

Build the package

pipenv run python -m build

Environment variables

No .env file or secret credentials are required to run or test this project.

Team

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

sciencii-0.1.3.tar.gz (25.2 kB view details)

Uploaded Source

Built Distribution

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

sciencii-0.1.3-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file sciencii-0.1.3.tar.gz.

File metadata

  • Download URL: sciencii-0.1.3.tar.gz
  • Upload date:
  • Size: 25.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for sciencii-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8171addb7f12d1c1f269d67bbf6478c0e549e87b59be6ab96ae7eb70bf123ab9
MD5 d8f9603b7cbd387cd910692eca5acd47
BLAKE2b-256 f64d005068463aef7d437c79df18b74d2b550a4634475122aa02e81c46060f66

See more details on using hashes here.

File details

Details for the file sciencii-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: sciencii-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for sciencii-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 eaa398fb5447ee1f2e9f1086e01da9fe76df86b8fe1e7132cd8052bbdc6939c6
MD5 75e46f534000b80d5a2f327bde08bfdc
BLAKE2b-256 c37a58408e167eac79d737aa3e6796ab9aa63ef90c0a9930fa688c4821cdadf8

See more details on using hashes here.

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