Questions tagged [python]
Python is a dynamic and strongly typed programming language designed to emphasize usability.
80 questions
0
votes
0
answers
10
views
Best Practice for Version Control with Desktop Apps
When I say version control here, I'm talking specifically about the version number of the software I'm working on. I'm using git and happy with the general workflow, and have plans on how to improve ...
1
vote
1
answer
45
views
Avoiding "$${terraform.workspace}" in Python CDKTF
I'd like to set count to 1 when TF_WORKSPACE is prod and 0 otherwise. I recently learned about Fn.conditional and would like to compare a working implementation of it, using purely Python CDKTF, with ...
1
vote
1
answer
367
views
Ansible Jinja2 evaluate string as template
I have a sort of configuration vars file through which I'm looping,
checks:
- name: "x"
setting: "y"
eval: "{{ 'OK' if var == 'x' else 'NOK' }}"
main.yml
- ...
0
votes
1
answer
194
views
Conflicts while building AWX-EE custom image
I'm currently building AWX EE custom image with the latest available but it seems latest versions got some conflicts with pip modules. My custom image was working great in July (awx-ee version 22.X 23....
1
vote
1
answer
978
views
Using a different Python version in AWX
I updated a recent playbook module that says I need to use at least Python version 3.8. I run this playbook on our AWX controller. When I run the cmd module and do a "which python3" I get ...
1
vote
2
answers
147
views
Options to build a production server as a solo python developer?
I'm new to DevOps and overwhelmed with all the options.
I write python web applications as a solo developer, on my local machine. I have a "staging" server and I have multiple websites under ...
1
vote
1
answer
3k
views
How to get gcp project name by project id
Using cloud function - trying to make get call to get the project name and with the id - https://cloud.google.com/resource-manager/docs/creating-managing-projects#listing_projects
from ...
0
votes
1
answer
2k
views
Vscode/pytest gives me an error when importing
I asked this question on the regular stackoverflow but i think you guys will be much more competent about this topic. My guess is that is some sort of python setup issue.
When I write an import line ...
0
votes
1
answer
2k
views
My Python application doesn't communicate with MySQL inside docker. Can someone help me?
The connection is not succeeding in docker. Look at my settings:
Dockerfile
FROM python:3.8.5-alpine
WORKDIR /app
COPY requirements.txt .
RUN python3 -m pip install --upgrade pip
RUN pip install -...
2
votes
0
answers
912
views
How to speed up environment loading on network drive?
Background:
I have about 15 AWS EC2 instances running Windows. They each have local drives and share a single network drive. Each needs to be able to run certain in-development python tools from ...
1
vote
1
answer
55
views
How to ensure data protection on remote server?
We have sensitive data from a customer and need to train a Neural Network for our customers.
However we have no severs to train the Neural Networks, so we want to rent GPU servers. There are many ...
0
votes
1
answer
637
views
AWS FARGATE ECS - Exact steps to deploy new Docker images with aws CLI
We run services in AWS FARGATE... our Docker builds are tagged before we push them to AWS with a Makefile.
I committed changes to a Docker service, ran make, and I see the new Docker image tag when I ...
3
votes
3
answers
704
views
pypa/gh-action-pypi-publish token value 'does not start with "pypi-"'
I am trying to use the pypa/gh-action-pypi-publish action in GitHub to push a Python package to PyPI. I'm in the team that owns microbiomedata/nmdc-schema and successfully uses a GitHub action to ...
1
vote
1
answer
241
views
Deploy to Ubuntu server with python script and awsebcli fails
Just yesterday everything worked fine on our AWS ElasticBeanstalk continuous deployment, but today suddenly fails with the following errors:
$ pip install awsebcli -q --upgrade
DEPRECATION: Python 2.7 ...
1
vote
1
answer
4k
views
Is there any Jenkins plugin for pylint results?
I have Pipeline which run Jenkinsfile. one of the stage is pylint:
python -m pylint --rcfile=.pylintrc --exit-zero ${MODULE} > ${WORKSPACE}/testreport/pylint.log
I know there was used to be ...
1
vote
1
answer
3k
views
403 forbidden error on calling jenkins post api from python script
I am trying to build a python script that will build jobs externally but when I am executing it, throws 403 forbidden error for build jobs call other get APIs are working fine. Below is the python ...
1
vote
1
answer
39
views
Tool or way to support handling dependencies of modules in various platforms (for machine learning in Python)
I am Data Scientist and I have a problem with setting of versions modules like Keras, Tensorflow PyTorch, etc.
Although I am using tools like virtuaenv or conda, my code isn't cross-platform, version ...
1
vote
2
answers
533
views
How to check minimum code coverage in pull request changes?
I want to force the developers to write unit tests for all new code they wrote. The code is written in python. I want to do it in the Jenkins pipeline. And here is a question. Is there any available ...
2
votes
1
answer
623
views
Is it a bad idea to use a web app including nginx, gunicorn and flask in a single docker container? [duplicate]
I want to deploy a web app as a docker container. Currently I need to set up nginx, gunicorn and flask to realize this. There are many guides around to do it in docker but always divide it in two ...
0
votes
1
answer
6k
views
How to save groovy output to pipeline variable
I have the below code in the jenkisn pipeline:
stage ("amd_distribution_input_transformation"){
steps{
script{
amd_distribution_input_transformation url: ...
6
votes
1
answer
909
views
What's the benefit of using Nginx to serve a Flask API on AWS?
I want to deploy a Flask API on AWS using Docker. A common way seems to be using a combination of Nginx + app server (e.g Gunicorn) + Flask app.
The reason to use app server seems obvious to me. ...
1
vote
1
answer
813
views
How to run WSGI Python server without Apache or NGINX [closed]
Is there a way to run a Python server that uses WSGI bindings directly? I am trying to go with the one process per container philosophy which will naturally get rid of Apache/NGINX from the container ...
2
votes
1
answer
2k
views
How to downgrade Jinja for Ansible?
I'm using Ansible 2.8.0 (ansible --version installed by brew on macOS) which is using Jinja 2.10.
I've tried to downgrade Jinja to 2.8 via pip3 install jinja2==2.8, and I can confirm the right ...
4
votes
1
answer
5k
views
How to connect to host during a Docker build?
I have a Dockerfile which I want to run some tests inside of as part of a multistage build. The tests attempt to make a connection to localhost, however it appears that they're not able to connect to ...
1
vote
1
answer
76
views
How do Django deployments happen on Servers?
I am new to Django six months ago and I learned how to deploy the Django projects to EC2 instances.
Basically 1st time when the Django project is deployed to EC2, the instance will be configured ...