Add usage instructions to README

This commit is contained in:
2022-04-23 20:15:04 +02:00
parent fd3dd492c2
commit d88392e849

View File

@@ -1,2 +1,49 @@
# Python Project # Python Project Test
This is a test package. This is a package testing the specification of metadata and dependencies using `pyproject.toml`. It makes a request to [wtfismyip.com](https://wtfismyip.com/text) and prints the response code and body.
## Installing the package
You can install the project by cloning it and using `pip install`:
```sh
git clone https://git.dietrich-rink.de/dietrich/pyprotest.git
cd pyprotest
pip3 install .
```
You can also install the package directly from gitea:
```sh
pip3 install git+https://git.dietrich-rink.de/dietrich/pyprotest.git
```
## Referencing the package as a dependency
You can add this package as a dependency by adding it to your `pyproject.toml`:
```toml
[project]
dependencies = [
"pyprotest @ git+https://git.dietrich-rink.de/dietrich/pyprotest.git"
]
```
## Running the package
After installing the package you can run it as a module:
```sh
python3 -m pyprotest
```
## Running tests
After cloning the repository and changing to its root directory you can run tests with `unittest`:
```sh
python3 -m unittest
```
## Building and running with podman
You can build and run this package as a podman image:
```sh
podman build -t pyprotest .
podman run pyprotest
```