Questions tagged [python]

Python is a dynamic and strongly typed programming language designed to emphasize usability.

Filter by
Sorted by
Tagged with
0
votes
1answer
5 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 ...
0
votes
1answer
21 views

how can I import python module tkinter in gitpod

I can't import pyton module tkinter in my gitpod workspace. My .gitpod.Dockerfile contains: FROM gitpod/workspace-full-vnc USER root RUN apt update && apt install -y python-tk python3-tk tk-...
0
votes
0answers
40 views

How to process output from a “hello world” python script?

This example builds fine: root@mordor:~/gitrepo/path-to-kubernetes/src/python/helloworld# root@mordor:~/gitrepo/path-to-kubernetes/src/python/helloworld# ll total 16 drwxr-xr-x 2 root root 4096 Oct ...
1
vote
0answers
25 views

How to execute a “hello redis” sample python script on a container from the host?

How do I execute this "Hello Redis!!!" sample from the host? root@mordor:~# root@mordor:~# docker container ls CONTAINER ID IMAGE COMMAND CREATED ...
1
vote
0answers
153 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 ...
0
votes
1answer
17 views

Strange behaviour with docker-py

Consider the following setup. Precondition: have a healthy image i.e. service starts up. E.g. docker run -d IMAGE Then, with the Python plugin docker-py, consider the following code which should ...
1
vote
0answers
34 views

How to prevent changes without Jira ID

Some times we can push changes without Jira ID. I want to prevent changes without mentioned `Jira ID'. Suppose projects named like: abc, def, ghi And have Jira ID's like: 1234-abc, 2525-def, and ...
1
vote
1answer
17 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 ...
2
votes
1answer
39 views

Continuous deployment of package to virtualenv

My colleagues don't want to create their own virtualenv and deploy my tools from git on their own as part of their automation. Instead they want the tools pre installed on a shared server. So I was ...
1
vote
2answers
53 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 ...
1
vote
0answers
66 views

Connection refused when CURLing to docker container from within Jenkins pipeline

I have a situation with a CI Pipeline I'm trying to implement using Jenkins and Docker . Inside my pipeline I want to: download a python uwsgi web app, build it in a docker container, run it, then ...
2
votes
1answer
80 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
1answer
275 views

How to inject credentials to python virtual env in jenkins?

I am trying to inject my credentials to a Jenkins Freestyle project. The project is building a python project in virtual environment with "behave" created with ShiningPanda plugin can someone help ...
0
votes
1answer
692 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: ...
3
votes
1answer
662 views

How to install aws cli on a self-hosted azure DevOps Windows agent?

I have quite some difficulties installing aws cli on a self-hosted Azure DevOps Windows agent as part of a pipeline. Does anyone have a working solution? What I have tried so far: a) install aws cli ...
4
votes
1answer
275 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. ...
2
votes
1answer
159 views

Share variables across instances

I'm writing TestInfra test scripts for mongo cluster instances using Molecule Ansible. I want to share variables across all the instances. I created a python class, and initialise and update the ...
0
votes
1answer
148 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 ...
1
vote
2answers
1k views

Unit Test AWS Glue job in CodePipeline

I have an AWS Glue job written in Python that I would like to perform pyunit tests on. However, from reading and experimenting on my own, there seem to be quite a few dependencies on the Glue service, ...
1
vote
1answer
140 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 ...
0
votes
1answer
3k views

Python Script in Jenkins

I am trying to run a python script in Jenkins. My Jenkins job is integrated with Jira & on build its gives JIRA_ISSUE_KEY. I want to save the value of JIRA_ISSUE_KEY in a variable. import ...
1
vote
1answer
369 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 ...
3
votes
1answer
1k views

Are AWS Boto3 calls asynchronous?

In the API documentation for Apache Cloud Stack for example, they put an (A) to designate asynchronous API calls. In the Boto3 - Python client API for AWS - documentation as I can't see anything like ...
1
vote
1answer
42 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 ...
1
vote
0answers
29 views

How to confugure proxy for Python Apache Cloud Stack client? [closed]

For example in the requests library you can set proxy explicitely. With exoscale/cs (a Python client for Apache Cloud Stack) it does not work for me. Environment variables are set correctly to ...
-2
votes
1answer
35 views

Where can I find a Dockerfile + required files to create a Flask/MySQL forum/webapp with users?

What I mean, is that I can simply run a command or download a .zip file that results in having a Dockerfile with the whole development environment baked in and includes not just Flask and MySQL set up,...
3
votes
1answer
19k views

Passing variables between scripts in a Jenkins pipeline

I have a declarative Jenkins pipeline that looks like the following: pipeline{ agent { ... } stages { stage("Provision EC2 Instance and Set ENV Variable"){ ...
1
vote
0answers
37 views

Python API requests with OAuth_requests lib behind a corporate proxy [closed]

In a Python app we run tests and publish the results into Zephyr in JIRA using the Zephyr/ JIRA API. It works fine not on a corporate network, but now they have switched to use their corporate network,...
1
vote
1answer
270 views

Jenkins Node Image at Kubernetes Plugin

I'm working on huge pipeline with different development environment (python, node, java). For manage this CI pipeline our teams using Jenkins at Kubernetes environment. I want to give PipeLine node ...
3
votes
2answers
12k views

Passing a jenkins credential (global) to a python script

I have a global jenkins credential and a config script that includes the line API_TOKEN = "Token XXX" For security reasons we can't keep the token in the script itself as its in version control. Is ...
-2
votes
1answer
34 views

Python Dictionary [closed]

I am getting the output from my previous executions something like this: [{u'Value': '2018-06-21', u'Key': 'Deletion_Date'}] I want to get only 2018-06-21 saved in a variable. I tried this ...
8
votes
3answers
190 views

What's a good devops approach for a single developer writing python web applications?

I'm guessing this question will seem incredibly trivial for some readers, but as someone who is a developer but with little experience of deploying apps in anything other than a manual, hit and hope ...
1
vote
1answer
41 views

Way to Connect to all ec2-instances one by one

Is there any way through which I can connect to all ec2-instances one by one through Python script to extract some server information from there. Please note that all ec2-instances lies behind a ...
3
votes
0answers
255 views

Dependency vulnerability scanner for Conda? [closed]

Python's pip dependency manager is supported by a number of vulnerability scanners (e.g., Snyk, Gitlab's gemnasium, PyUp), but I have not found such a service for scanning dependencies defined in ...
2
votes
1answer
103 views

Cross Region Copy of Aurora Snapshots

current_date = str(dt.now().strftime('%Y-%m-%d')) target_cluster_snapshot_arn= current_date+'_Development_Aurora' response = TARGET_CLIENT.copy_db_cluster_snapshot( ...
2
votes
1answer
460 views

does boto3 have a way to get resource limits from a region?

Right now I am looking for ec2 instances type limits for a given region. I would like to put in place an audit script that tracks our usage vs our limits for a given set of things. Also open to ...
4
votes
2answers
80 views

Best way to isolate programming projects?

Not sure if this is the best place for the question but I have multiple development projects with different dependencies.. I want to know what the best practice is to isolate each project? I have ...
2
votes
1answer
99 views

Git Files Encryption for Business

I am using git and have the following problem: In the company where I work you now want to protect the source code from theft. So if for some reason a developer lets the source code of a project go ...
0
votes
1answer
1k views

Why flask is returning a default login page instead mine, custom one [closed]

I have an issue with my app, since I was adding the feature "users roles" I am getting a strange page content on login page looks like default login page instead of my custom login page and I cannot ...
3
votes
2answers
200 views

Automating creation of new VM and pushing code to server

Automating creating of new VM and pushing code to server Hi all, I am writing a integration test for a client-server application. To simulate the production server setup, and to update the code, I ...
-3
votes
1answer
2k views

Unable to run AWS CLI commands from Rundeck-No module named botocore.session

From terminal all works fine, botocore is installed Traceback (most recent call last): File "/bin/aws", line 19, in <module> import awscli.clidriver File "/usr/lib/python2.7/...
11
votes
1answer
7k views

Dockerized Flask: Connection reset by peer

Trying to connect to a dockerized Flask app fails with error 104, 'Connection reset by peer' using this minimal example: app.py: from flask import Flask app = Flask(__name__) @app.route("/") def ...
4
votes
1answer
823 views

Create multiple EC2 instances using python script (in loop iteration)

I Have JSON file in which email address and count of instances are specified.I'm using python script to iterate through that file and get username/count number (count number will be used as number of ...
0
votes
2answers
201 views

Problem with Anaconda installation

This is what comes up any time I start up Anaconda Prompt - \Xtralien was unexpected at this time. C:\Users\User Name> @SET "PATH=C:\Program Files (x86)\QuantumWise\VNL-ATK-2016.3\bin;...
2
votes
1answer
1k views

Using Anaconda instead of pip+virtualenv

We are currently using pip+virtualenv and install all our Python dependencies during the application build step on the CI. This requires compiling some of the packages, which contain C modules, which ...
14
votes
1answer
4k views

A systematic way to test RESTful APIs with curl?

I have noticed during integration testing that I actually work on recurring use cases with restful APIs (or in general HTTP interfaces) I check here and there with bash+cURL. It starts looking quite ...
-1
votes
1answer
344 views

How to avoid and fix the warning from Graphite-manage?

We installed Graphite on our Linux server, and when we started running it, we saw the following warning from the graphite-manage script: graphite-manage syncdb --noinput /usr/lib/python2.7/site-...
-3
votes
3answers
165 views

What approach should I follow for adopting continuous integration?

I have a WAMP server which hosts a Django application by using a Windows server. Currently I am deploying everything manually. Now I want apply Continuous Integration concepts to an existing ...
3
votes
2answers
1k views

How to connect to external etcd server inside of docker container (python application)?

I have a Cement application that runs inside of a docker container. In this image I have to connect to etcd. Inside of my docker image I have config that for etcd is set to localhost that I know is ...
6
votes
3answers
1k views

Re-using Python virtual environments on a build server

Currently, every time we run a build through Jenkins+Ansible, we are re-creating a virtual environment and re-installing all the dependencies listed inside the requirements.txt file. This is very ...