A small example package
Project description
Test Package
This is a simple example of how to create a Python package.
Installation
Run pip install yidas-TestPackage
Structure
packaging_tutorial/
├── LICENSE
├── pyproject.toml
├── README.md
├── src/
│ └── TestPackage_yidas/
│ ├── __init__.py
│ └── example.py
└── tests/
example.py
:
def greet():
return "Hello, world!"
TestClass.py
:
class TestClass:
def greet(self):
return "Hello, world!"
__init__.py
:
# Autoload (TestClass.TestClass => TestClass)
from .TestClass import TestClass
pyproject.toml
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "TestPackage_yidas"
...
Usage
from TestPackage_yidas import example
from TestPackage_yidas import TestClass
print(example.greet())
obj = TestClass()
print(obj.greet())
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
Built Distribution
Close
Hashes for testpackage_yidas-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7396980c207197869302458752340b05050a76fec0bb387a691086a30ee0ab24 |
|
MD5 | 4c8a26581e5463015b9d76bc487803cb |
|
BLAKE2b-256 | 1ac580a3233168762e994ca471083eeb26b01e6d26583895a066380a59986d65 |