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
File details
Details for the file testpackage_yidas-0.0.6.tar.gz
.
File metadata
- Download URL: testpackage_yidas-0.0.6.tar.gz
- Upload date:
- Size: 1.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34d0453dbcfc75e63658b9f0d2bb1e42f83719a54921bdc9c375443fb18d9858 |
|
MD5 | 99f919b0d928be61487fb9f711bf827e |
|
BLAKE2b-256 | 3abbb79cf44ea71f45ad99b5a8dff422709ae5e7a79902afbe31e6d2b7198f8c |
File details
Details for the file testpackage_yidas-0.0.6-py3-none-any.whl
.
File metadata
- Download URL: testpackage_yidas-0.0.6-py3-none-any.whl
- Upload date:
- Size: 2.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7396980c207197869302458752340b05050a76fec0bb387a691086a30ee0ab24 |
|
MD5 | 4c8a26581e5463015b9d76bc487803cb |
|
BLAKE2b-256 | 1ac580a3233168762e994ca471083eeb26b01e6d26583895a066380a59986d65 |