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.1.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.1-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: sciencii-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 4b50f0215f41ad9666c5fe8035231cee174aeebf004a843f56be42756fd43cab
MD5 e892e5ad481b66e44194f5dd1a667680
BLAKE2b-256 c4d8f21f73bc2b6225338a853d1c4d504f640d83d05fab049154789dfb599c52

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sciencii-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a41f3b0d6cd85416ab288ebce3a777091139fe51b2928694b78a5b246cbe4a62
MD5 d7052b664219cb12716baeea799f561c
BLAKE2b-256 09d6ba0e50c2333ad752984569f76e665493fae9839772146223f7a3edee4833

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