From d88392e849f3878612dcdc46970b0e903c5ac031 Mon Sep 17 00:00:00 2001 From: dietrich Date: Sat, 23 Apr 2022 20:15:04 +0200 Subject: [PATCH] Add usage instructions to README --- README.md | 51 +++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 49 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 533749b..c29d541 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,49 @@ -# Python Project -This is a test package. +# Python Project Test +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 +``` \ No newline at end of file