No project description provided
Project description
Metastock
Environment
Since poetry
helps us manage environments, we no longer need to use Python virtualenv.
When creating a new project and using it with PyCharm, it will be fully integrated with the default mechanism. This will
create a new isolated environment in the /.cache/pypoetry/
folder.
Lúc đó, chỉ còn trường hợp xảy ra là mình muốn thay đổi version của python. For more info, visit link
pyenv install 3.9.8
pyenv local 3.9.8 # Activate Python 3.9 for the current project
poetry install
Development
PM2
In local development, we can use pm2 with command
pm2 start metastock/bin/start_consumer.py --log-date-format '' --interpreter=/home/wsl/.cache/pypoetry/virtualenvs/metastock-bq6tFdVW-py3.11/bin/python --instances 4 --max-memory-restart 1G -- --name=test_consumer
Production
So far, the significant way is run by pm2. This is the best method that will not consume much time and resources compared to building a Docker file or Kubernetes.
But, we need create a python file to call metastock module
Ex:
pm2 start metastock/start_consumer.py --log-date-format '' --interpreter=/home/wsl/.cache/pypoetry/virtualenvs/metastock-bq6tFdVW-py3.11/bin/python --instances 4 --max-memory-restart 1G -- --name=test_consumer
Publish app
-
Increase version in
pyproject.toml
-
Run publish command
poetry publish --build
Refer:
- Create a package https://typer.tiangolo.com/tutorial/package/
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for metastock-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d540751ddd34813ff98f36fb35046bba52e211ac133be07c9ab2ae6d2413ad8 |
|
MD5 | 59624738d34651c2813035719ddeb2e2 |
|
BLAKE2b-256 | 3a8f8acc00a82ab15c2a013e3481a7afe238cf87a8115428be38d42ed9841c89 |