From 746afab067ea166718ac403f76d9cc0f94f54ec1 Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 2 May 2022 01:45:55 +0300 Subject: [PATCH] Adding venv. 'pyTelegramBotAPI' already included. --- .gitignore | 5 +++++ README.md | 29 ++++++++++++++++++++++++++++- requirements.txt | 6 ++++++ 3 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 .gitignore create mode 100644 requirements.txt diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5493d8f --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +# IDE settings +/.idea + +# Python +/.venv diff --git a/README.md b/README.md index 3d33bc0..4b166d3 100644 --- a/README.md +++ b/README.md @@ -1 +1,28 @@ -**Telegram RSS Bot** \ No newline at end of file +# Telegram RSS Bot +## Setting up virtual environment + +To be able to isolate project environment we'll use +[Python's venv](https://docs.python.org/3/library/venv.html). + +### Setting up new environment and installing dependencies + +```shell +# Create VirtualEnv directory +python -m venv ./.venv +# Loading environment +source .venv/bin/activate +# Installing dependencies +pip install -r requirements.txt +``` + +### Adding dependencies + +```shell +# Installing new dependency +pip install somedependency +# Rewriting dependency file +pip freeze > requirements.txt +``` + +**Do not forget** to install the latest dependencies before adding new dependencies and rewriting +the `requirements.txt` file. Otherwise old dependencies could be lost. diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..8b2e6e8 --- /dev/null +++ b/requirements.txt @@ -0,0 +1,6 @@ +certifi==2021.10.8 +charset-normalizer==2.0.12 +idna==3.3 +pyTelegramBotAPI==4.5.0 +requests==2.27.1 +urllib3==1.26.9 -- 2.43.5