Metadata-Version: 2.4
Name: davsemone
Version: 0.1.0
Summary: Print DAV semester-one practical source code in Python and Jupyter output cells.
Author: DAV Sem One
License: MIT
Project-URL: Homepage, https://pypi.org/project/davsemone/
Keywords: dav,python,jupyter,practicals,education,source-code
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Education
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# davsemone

`davsemone` is a lightweight educational Python package that prints the
source code of five DAV practicals directly into a Python terminal or
Jupyter Notebook output cell.

## Installation

After the package is published to PyPI:

```bash
pip install davsemone
```

## Use in Jupyter Notebook

```python
import davsemone

davsemone.prac1()
```

The output cell displays the Practical 1 Python source code itself.

Available commands:

```python
davsemone.prac1()
davsemone.prac2()
davsemone.prac3()
davsemone.prac4()
davsemone.prac5()

# Alternative forms:
davsemone.practical1()
davsemone.show(1)

# Return code as a string instead of printing:
code = davsemone.get_code(1)
```

## Publish to PyPI

From the project folder:

```bash
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
```

PyPI will ask for authentication. The recommended method is to use a PyPI
API token as the password and `__token__` as the username.

## Test on TestPyPI first

```bash
python -m twine upload --repository testpypi dist/*
```

Then install the test release with:

```bash
pip install --index-url https://test.pypi.org/simple/ davsemone
```

## Updating the package

Before publishing a later version, change the version in `pyproject.toml`,
for example from `0.1.0` to `0.1.1`, delete old files from `dist/`, rebuild,
and upload again. PyPI does not allow re-uploading the same version number.

## Source basis

The practical code bundled in this project was extracted from the five
Jupyter notebooks supplied for this package.
