Until now I use pyenv
to install python versions under a user name pydev
in directory /home/pydev
. I use the Debian package direnv
to link the project directory with a python version installed using pyenv
. I use pip-tools
to store the custom python environment for each project in the project directory.
Edit - The rationale for isolated development environments is given in this link
https://pwal.ch/posts/2019-11-10-sane-python-environment-2020-part-1-isolation/
Edit - The author of the link above developed his own isolated python environment tools here (I don't want to install one python version per project so I use Pyenv and pip-tools to link the python version with the env library):
https://github.com/pwalch/lonesnake
I am authoring python applications for use in development, potential patent disclosure, and hopefully to launch in production on a Linux Debian server. The Filesystem Hierarchy Standard (FHS) specifies storage of data in /srv
and software applications in /opt
.
https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/Linux-Filesystem-Hierarchy.html#opt
/opt/pythonapp01/code0000
/srv/pythonapp01/eod-data
The application I am working on now uses end-of-day data in csv format that does not update in development but would update every night in production. The python code would transform the csv to other csv formats for storage as files and transform those modified csv files into file formats for serving Highcharts stockcharts.
My question is how to organize directories under Linux Filesystem Hierarchy? How to store files for development, to support a possible patent disclosure, and to put the resulting python application(s) into production on a Linux Debian server? Should development and documentation files be located in a user folder? Should eod data go into /srv/pythonapp01
and code go into /opt/pythonapp01/code0000
? Should pyenv
and pip-tools
installed environment also go into the application directory under /opt
in production? I have read that applications should avoid using the system python in production and I have never setup a python app in production so it would help to get some guidance early in the development phase.
maptool
is available as a .deb package but installs into /opt) - installed as a tar file or by compiling the source, without apt or dpkg.