Skip to main content

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

testpackage_yidas-0.0.6.tar.gz (1.4 kB view details)

Uploaded Source

Built Distribution

testpackage_yidas-0.0.6-py3-none-any.whl (2.1 kB view details)

Uploaded Python 3

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

Hashes for testpackage_yidas-0.0.6.tar.gz
Algorithm Hash digest
SHA256 34d0453dbcfc75e63658b9f0d2bb1e42f83719a54921bdc9c375443fb18d9858
MD5 99f919b0d928be61487fb9f711bf827e
BLAKE2b-256 3abbb79cf44ea71f45ad99b5a8dff422709ae5e7a79902afbe31e6d2b7198f8c

See more details on using hashes here.

File details

Details for the file testpackage_yidas-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for testpackage_yidas-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 7396980c207197869302458752340b05050a76fec0bb387a691086a30ee0ab24
MD5 4c8a26581e5463015b9d76bc487803cb
BLAKE2b-256 1ac580a3233168762e994ca471083eeb26b01e6d26583895a066380a59986d65

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page