I have this application created with serverless framework using python language, but I am not finding a way to debug it locally or at least run it just to test it out before deploying it to amazon's web services.
Is there any way to run serverless application (with python) using pycharm or any other tool?
it is possible to some extent. The first way is using invoke local command to invoke individual functions. The other way is to use serverless-offline plugin: https://github.com/dherault/serverless-offline
Running Lambda locally. First, you need to be able to run Lambda locally. ...
Enable PyCharm to run bash scripts. Now we want to run python-lambda-local from PyCharm rather than the terminal. ...
Create a bash script. ...
Edit Run Configurations in PyCharm. ...
Enjoy!
Related
Is it possible to run Locust tests from inline code without access to the shell? I am trying to deploy an AWS Lambda-based backend for my application to run load tests. I have not been able to find any documentation about running tests directly from the Python file without using the terminal.
This is covered in the Locust docs, though it's not framed quite as you are phrasing it.
"It is possible to start a load test from your own Python code, instead of running Locust using the locust command."
https://docs.locust.io/en/stable/use-as-lib.html
I have been writing a pretty simple python quizz system (called game.py) and I am working to deploy it on heroku. The app functions exclusively within the confines of a python console, with no interface of any kind but that provided by a terminal.
As such, I would like to be able to have the application on Heroku simply be akin to what you obtain with a one-off dyno, available on the dashboard (or in a terminal with the CLI) with:
heroku run python game.py
The application works perfectly well in it's deployed form (exclusively from the Heroku git) and locally, but in order for the app to be available to a larger public, I would need to have such a console appear on the "https://[appname].herokuapp.com/" URL that you are given on deployment of the app.
Naively, I would think this to be unspeakably simple to pull off, but I have yet to find a way to do it.
The only reasonable thing I have found would have been to create a Procfile, but lacking any documentation on the commands available, I only have been able to try variations of:
web: run python game.py
Which doesn't create a web console. And:
web: bash
Which simply crash with error code h10, with no other information given.
Any help, any suggestion, any workaround you can think of would be extremely appreciated.
I have a Python AWS Lambda running on a Linux, but due to some dependencies, I need it to be deployed on a Windows. I have tried using Python Azure Functions and have successfully deployed it on a Linux as well, but found out they cannot be deployed on Windows. Is it possible to do it with AWS Lambda?
Basically my solution has a few .exe that need to be run by a python library (Tesseract OCR and pytesseract)
AWS Lambda and Azure Functions are considered Function as a Service (FaaS) solutions, where the developer worries about the code and the cloud provider worries about availability, scalability and the platform underneath to run the code.
In that aspect, you can't run any of them on a server. If you need specific Windows dependencies, you must create a Python project as you normally would, install the dependencies and configure the Windows Server, being responsible for infrastructure and OS configurations and management.
How to Integrate jenkins with Selenium-webdriver. I am using Python language for Selenium TestCases. I have tried 'pyvirtualdisplay' Python module to hide the display on Jenkins CLI. Currently I have used ant build scripts to execute the Python Test Suit.
I want to use Jenkins "Selenium" plugin to integrate my Python Testcases. But "Selenium" plugin allows only "HTMLSuite" files.
How to run my Python TestCase using Jenkins "Selenium" Plugin?
I have tried downloading the Selenium Plugin (the one that says Grid on the description) and what it does is creates a Selenium Server on Jenkins. Then, if you read the specifications of the plugin (https://wiki.jenkins-ci.org/display/JENKINS/Selenium+Plugin) you will see that you need to indicate your script to target Jenkin's Selenium Server that is running.
I get to run my test outside Jenkins but does not start a broswer (is headless) and is not doing some of the visual commands (as easy as take as screenshoot).
Then I saw this video that helps to build a task with a Selenium testcase:
http://www.dailymotion.com/video/xkw0zb_jenkins-running-a-selenium-job_tech
Hudson is an older version of Jenkins
He creates a build.xml that basically does everything.
I am still investigating on how to create that build.xml file
Hope all this helps you somehow.
Best of lucks,
I'm using the Windmill test system and have it running using test_windmill for Django which works fine for the Python tests. I'd like this to run a suite of Javascript tests also whilst the Django test server is running. I've used the run_js_tests call from the Windmill shell which works fine but I can't find a way to have this run as part of the Python tests.
Does anyone know how to do this?
Thanks
Rob
Ok, so couldn't find out how to do this so I'm running the website under Apache and using the windmill standard jstests parameter to run the Javascript tests against this.