python versioning tool

Jupyter

Junior Member
Joined
Dec 18, 2021
Messages
26
Reaction score
6
happy new year !

I'm doing self-study in python. What do companies prefer anaconda or pipenv in development / testing ? What about in production environment ? Do people install anaconda or pipenv there or they use CICD tools ?

Thanks !
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,550
Reaction score
1,302
happy new year !

I'm doing self-study in python. What do companies prefer anaconda or pipenv in development / testing ? What about in production environment ? Do people install anaconda or pipenv there or they use CICD tools ?

Thanks !
If anyone else do respond to you, good.
Here is what I found for your reading
 

Jupyter

Junior Member
Joined
Dec 18, 2021
Messages
26
Reaction score
6
If anyone else do respond to you, good.
Here is what I found for your reading


Thanks David. I'm using the pipenv .env file. I want to control the vars for different programs. Don't know still valid in production. Anyway, I'm still interested to know what they use in production.
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,550
Reaction score
1,302
Thanks David. I'm using the pipenv .env file. I want to control the vars for different programs. Don't know still valid in production. Anyway, I'm still interested to know what they use in production.
Outside of Python in unix system, environment variables can be easily controlled at the shell level. I don't do production python in this manner. My experience for all other languages like Java, Perl, C, shell scripts and more will be simply a shell source command as such

Bash:
$ cat ./setenv.opt_ext_you_like
export ABC=DEF
$ cat ./sample.py
#!/usr/bin/env python3

import os

print(os.getenv('ABC', '"ABC" env var not found'))
$ set | grep ABC
$ ./sample.py
"ABC" env var not found
$ . ./setenv.opt_ext_you_like
$ set | grep ABC
ABC=DEF
$ ./sample.py
DEF

If your are doing CI/CD, you can always control which environment variables you want to inject. Using any deployment tools like Chef, Ansible, Saltstack, there will be some form of approach to control environment variables of the process being executed. Same for any CI/CD environment. A simple shell script file is all you need. That .env file is just a very python thing. Ultimately you don't need to restrict yourself to one form of ecosystem management. Environment variables are not language specific concept. It's actually a base system feature either at the shell level or OS level.

In fact for controlling of multiple environments, you can even go as far as sourcing your environmental properties using remote redis, memcache, or any other in-memory approaches. I highly doubt there is one best way, it's all about how much effort you want to build an infrastructure for maintainability. It can also be incorporated into things like cloud-init, which is a mechanism one can find out cloud computing environments like AWS, which things are control during instance booting and instantiation. You can also control via retrieval from database.

In all the ways I have suggested, you find there is no one best way, only the way that works best for you.

:)
 
Last edited:

Trader11

Banned
Joined
Oct 14, 2018
Messages
15,697
Reaction score
5,235
Outside of Python in unix system, environment variables can be easily controlled at the shell level. I don't do production python in this manner. My experience for all other languages like Java, Perl, C, shell scripts and more will be simply a shell source command as such

Bash:
$ cat ./setenv.opt_ext_you_like
export ABC=DEF
$ cat ./sample.py
#!/usr/bin/env python3

import os

print(os.getenv('ABC', '"ABC" env var not found'))
$ set | grep ABC
$ ./sample.py
"ABC" env var not found
$ . ./setenv.opt_ext_you_like
$ set | grep ABC
ABC=DEF
$ ./sample.py
DEF

If your are doing CI/CD, you can always control which environment variables you want to inject. Using any deployment tools like Chef, Ansible, Saltstack, there will be some form of approach to control environment variables of the process being executed. Same for any CI/CD environment. A simple shell script file is all you need. That .env file is just a very python thing. Ultimately you don't need to restrict yourself to one form of ecosystem management. Environment variables are not language specific concept. It's actually a base system feature either at the shell level or OS level.

In fact for controlling of multiple environments, you can even go as far as sourcing your environmental properties using remote redis, memcache, or any other in-memory approaches. I highly doubt there is one best way, it's all about how much effort you want to build an infrastructure for maintainability. It can also be incorporated into things like cloud-init, which is a mechanism one can find out cloud computing environments like AWS, which things are control during instance booting and instantiation. You can also control via retrieval from database.

In all the ways I have suggested, you find there is no one best way, only the way that works best for you.

:)
In before Fargate or Terraform
 

davidktw

Arch-Supremacy Member
Joined
Apr 15, 2010
Messages
13,550
Reaction score
1,302
In before Fargate or Terraform
Terraform is not so different from other deployment management tools and it takes care of the infrastructure, hence a IAC, Ansible is also a IaC. I have not really compare much between the 2 of them and I have more experience using Ansible myself, but some projects have architect do use Terraform too.

As for Fargate, it don't think it is even an equivalent. It is a PaaS. I will put it in equivalence of just simple EC2 with less invasive management and more automation packaging methodology. EKS or ECS are of very similar levels, packed with their own style of packages management.

There are numerous levels at which you can piece things together to achieve a fairly wide automation and segregation. It's just a matter of choice.
:)
 
Last edited:
Important Forum Advisory Note
This forum is moderated by volunteer moderators who will react only to members' feedback on posts. Moderators are not employees or representatives of HWZ Forums. Forum members and moderators are responsible for their own posts. Please refer to our Community Guidelines and Standards and Terms and Conditions for more information.
Top