Skip to main content

A sample Python package demonstrating PyPI publishing

Project description

Demo Package for PyPI

A sample Python package demonstrating how to create and publish packages to the Python Package Index (PyPI).

Features

  • Calculator: A simple calculator class with basic mathematical operations
  • Greeter: Functions to greet single or multiple people

Installation

pip install chandra-pypi-demo

Usage

Calculator

from demo_package import Calculator

calc = Calculator()
result = calc.add(5, 3)  # Returns 8
result = calc.multiply(4, 7)  # Returns 28
result = calc.divide(10, 2)  # Returns 5.0

# View calculation history
history = calc.get_history()
print(history)

Greeter

from demo_package import greet, greet_multiple

# Greet a single person
message = greet("Alice")
print(message)  # "Hello, Alice!"

# Greet with custom message
message = greet("Bob", "Hi")
print(message)  # "Hi, Bob!"

# Greet multiple people
message = greet_multiple(["Alice", "Bob", "Charlie"])
print(message)  # "Hello, Alice, Bob, and Charlie!"

Requirements

  • Python 3.7 or higher

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Author

Chandra - chandra385123@gmail.com

Project Structure

chandra-pypi-demo/
├── demo_package/
│   ├── __init__.py
│   ├── calculator.py
│   └── greeter.py
├── pyproject.toml
├── README.md
├── LICENSE
├── MANIFEST.in
└── .gitignore

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

chandra_pypi_demo-0.1.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

chandra_pypi_demo-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file chandra_pypi_demo-0.1.0.tar.gz.

File metadata

  • Download URL: chandra_pypi_demo-0.1.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.7

File hashes

Hashes for chandra_pypi_demo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 508b08d3eb1370b20ea997702a77114d9cf9084c0969debe0a0bbe060e600c6c
MD5 109d7adb3606c205230ab05aebc773b3
BLAKE2b-256 decdc2621a9d2976efff8c04a4ec050168dc2bcdd60f8237f4a72955bb58a125

See more details on using hashes here.

File details

Details for the file chandra_pypi_demo-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for chandra_pypi_demo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c6b3ce02ea062e20e66608f4db0568d4def3223a1d67ad37373133c75de24a8d
MD5 6aee82344e3bf53dd673c2458ccd82bb
BLAKE2b-256 aa24c09f341a4784cf27d3084cd2909b9eaa7cc51ca27739cfdf91871c4ba457

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