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

Uploaded Python 3

File details

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

File metadata

  • Download URL: sciencii-0.1.4.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.4.tar.gz
Algorithm Hash digest
SHA256 bcb13ea33a4a9f5e95820610205549a0637f6ededf24ef4d6f53eb517ba27f7d
MD5 7ac82ff3ef22aa925829c73e8c5a90f1
BLAKE2b-256 c346f6dea986f7a2d1c889ad533652f5be27a1f6b6334b9315f7260ece54dbfb

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sciencii-0.1.4-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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e85339c2db3107ab7c7dccff22b56024e2e86140047f7b0240000f0e4d08cfe5
MD5 0a09a422b6dec0facc162863ff39ab6a
BLAKE2b-256 89b2373539b96cdabaca071676a1cd557c4c815a017e04a57728f5df7a78e0a7

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