Python venv #9
5
.gitignore
vendored
Normal file
5
.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# IDE settings
|
||||||
|
/.idea
|
||||||
|
|
||||||
|
# Python
|
||||||
|
/.venv
|
29
README.md
29
README.md
|
@ -1 +1,28 @@
|
||||||
**Telegram RSS Bot**
|
# 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.
|
||||||
|
|
6
requirements.txt
Normal file
6
requirements.txt
Normal file
|
@ -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
|
Loading…
Reference in a new issue