Django + Celery + AWS SQS setup on Elastic Beanstalk
Hi,
I am having a lot of trouble with the deployment to AWS Elastic Beanstalk of a Django app that uses Celery.
I want to deploy an app that runs a simple task every minute and prints something to the console. (I have the code attached below)
Locally, it works flawlessly
I start the beat: celery -A dcf\_env beat -l INFO
I start the worker: celery -A dcf_env worker -l INFO -P solo
I made an SQS queue named 'my-queue' which receives messages from my beat. And my worker successfully consumes the messages from the queue and prints something to the console.
I can't understand how to start the beat and the worker in AWS Elastic Beanstalk. Are they even supposed to run in Elastic Beanstalk, or do I need to use some other service like a separate EC2 instance?
What do my .config files need to look like in .ebextensions folder? Is my project structure even correct? (Project Structure photo attached below)
I have deployed the application without Celery before, but now I want to integrate the project with Celery running this simple_task.
Can anyone point me to the right tutorial on how to set this up, or any up to date documentation? Any help would be
/r/django
https://redd.it/v0uael
Hi,
I am having a lot of trouble with the deployment to AWS Elastic Beanstalk of a Django app that uses Celery.
I want to deploy an app that runs a simple task every minute and prints something to the console. (I have the code attached below)
Locally, it works flawlessly
I start the beat: celery -A dcf\_env beat -l INFO
I start the worker: celery -A dcf_env worker -l INFO -P solo
I made an SQS queue named 'my-queue' which receives messages from my beat. And my worker successfully consumes the messages from the queue and prints something to the console.
I can't understand how to start the beat and the worker in AWS Elastic Beanstalk. Are they even supposed to run in Elastic Beanstalk, or do I need to use some other service like a separate EC2 instance?
What do my .config files need to look like in .ebextensions folder? Is my project structure even correct? (Project Structure photo attached below)
I have deployed the application without Celery before, but now I want to integrate the project with Celery running this simple_task.
Can anyone point me to the right tutorial on how to set this up, or any up to date documentation? Any help would be
/r/django
https://redd.it/v0uael
reddit
Django + Celery + AWS SQS setup on Elastic Beanstalk
Posted in r/django by u/Ok_Cancel_3183 • 16 points and 5 comments
If you want to go serverless using Django + Zappa + AWS Services, here is a video I made. Hope it helps!! 💻
https://youtu.be/hfASvBlCNkY
/r/djangolearning
https://redd.it/v14yrl
https://youtu.be/hfASvBlCNkY
/r/djangolearning
https://redd.it/v14yrl
YouTube
Deploy a Django App using Zappa + Amazon API Gateway + Lambda || Part 1
Create a Django App
https://youtu.be/esbkFdGUXOk
Creating an Amazon S3 Bucket
https://youtu.be/zh1eA5eNPYs
Twitter:
https://twitter.com/balt1794
Dev.to:
https://dev.to/balt1794/
Subscribe!!
https://youtu.be/esbkFdGUXOk
Creating an Amazon S3 Bucket
https://youtu.be/zh1eA5eNPYs
Twitter:
https://twitter.com/balt1794
Dev.to:
https://dev.to/balt1794/
Subscribe!!
Tuesday Daily Thread: Advanced questions
Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.
If your question is a beginner question we hold a beginner Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/v1dbgz
Have some burning questions on advanced Python topics? Use this thread to ask more advanced questions related to Python.
If your question is a beginner question we hold a beginner Daily Thread tomorrow (Wednesday) where you can ask any question! We may remove questions here and ask you to resubmit tomorrow.
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/v1dbgz
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/v23qzz
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/v23qzz
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/v2vgf8
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/v2vgf8
reddit
Thursday Daily Thread: Python Careers, Courses, and Furthering...
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python...
Make Your Matplotlib Plots Stand Out Using This Cheat Sheet
https://pub.towardsai.net/make-your-matplotlib-plots-stand-out-using-this-cheat-sheet-8c666de90433
/r/pystats
https://redd.it/uyv4tq
https://pub.towardsai.net/make-your-matplotlib-plots-stand-out-using-this-cheat-sheet-8c666de90433
/r/pystats
https://redd.it/uyv4tq
Medium
Make Your Matplotlib Plots Stand Out Using This Cheat Sheet
Cheat sheet for editing the background, ticks, and annotations in Matplotlib
Making a Custom Graph in Jupyter Noteboook
I'm interested in plotting nontraditional logic,math, and networking graphs that don't fall on xy planes or maps. Does anyone know good tutorials for making these nontraditional graphs in Jupyter notebook I would also like them to be interactive?
/r/JupyterNotebooks
https://redd.it/v3h6or
I'm interested in plotting nontraditional logic,math, and networking graphs that don't fall on xy planes or maps. Does anyone know good tutorials for making these nontraditional graphs in Jupyter notebook I would also like them to be interactive?
/r/JupyterNotebooks
https://redd.it/v3h6or
reddit
Making a Custom Graph in Jupyter Noteboook
I'm interested in plotting nontraditional logic,math, and networking graphs that don't fall on xy planes or maps. Does anyone know good tutorials...
How to connect SQL Server to Jupyter
Hello guys! Does anyone know how's the best way to connect to SQL Server through Jupyter Notebooks?
​
Thanks in advance
/r/JupyterNotebooks
https://redd.it/v780gr
Hello guys! Does anyone know how's the best way to connect to SQL Server through Jupyter Notebooks?
​
Thanks in advance
/r/JupyterNotebooks
https://redd.it/v780gr
reddit
How to connect SQL Server to Jupyter
Hello guys! Does anyone know how's the best way to connect to SQL Server through Jupyter Notebooks? Thanks in advance
Django: Live PostgreSQL Database using AWS
Hi, have you tried creating a live PostgreSQL database for your Django project and it didn't work. In this video I will show you how to create a live PostgreSQL database through AWS.
https://youtu.be/sKIXAM_n3vU
/r/django
https://redd.it/vj198y
Hi, have you tried creating a live PostgreSQL database for your Django project and it didn't work. In this video I will show you how to create a live PostgreSQL database through AWS.
https://youtu.be/sKIXAM_n3vU
/r/django
https://redd.it/vj198y
YouTube
Django: How to Create a Live PostgreSQL Database using AWS (Amazon Web Services).
Hi, in this video you will learn how to setup a live PostgreSQL database in Django using AWS (Amazon Web Services) for free.
Happy learning!
We will appreciate your support
Paypal:
clintonmatics@gmail.com
Patreon:
https://www.patreon.com/codewithclinton…
Happy learning!
We will appreciate your support
Paypal:
clintonmatics@gmail.com
Patreon:
https://www.patreon.com/codewithclinton…
Old android phone as flask test server
I know this isn't anything new, but I hadn't considered this before so thought I'd share. Flask apps are pretty lightweight so I pulled out an old Pixel 3 XL I had laying around and repurposed it into a flask dev server in no time and doesn't require rooting (unless you want docker). Shouldn't harm anything, but usual disclaimer if you try this on your primary phone.
1. Factory reset phone for good starting base (Optional, recommended if you aren't using it)
1. Also connect to wifi
2. Install termux (from f-droid, not the app store)
1. Download apk: f-droid.org/repo/com.termux_118.apk
2. Allow install from external sources and install
3. Launch termux
3. Set password and update environment
1.
2.
4. Install and run ssh server (dropbear for convenience)
1.
2.
5. Termine IP address and test ssh (should be able to access)
1.
6. Install python
1.
7. Create your flask application, scp it over if needed, and run in termux
1.
8. You should
/r/flask
https://redd.it/vlz6kt
I know this isn't anything new, but I hadn't considered this before so thought I'd share. Flask apps are pretty lightweight so I pulled out an old Pixel 3 XL I had laying around and repurposed it into a flask dev server in no time and doesn't require rooting (unless you want docker). Shouldn't harm anything, but usual disclaimer if you try this on your primary phone.
1. Factory reset phone for good starting base (Optional, recommended if you aren't using it)
1. Also connect to wifi
2. Install termux (from f-droid, not the app store)
1. Download apk: f-droid.org/repo/com.termux_118.apk
2. Allow install from external sources and install
3. Launch termux
3. Set password and update environment
1.
passwd2.
pkg update && pkg upgrade4. Install and run ssh server (dropbear for convenience)
1.
pkg install dropbear2.
dropbear5. Termine IP address and test ssh (should be able to access)
1.
ifconfig|grep inet6. Install python
1.
pkg install python7. Create your flask application, scp it over if needed, and run in termux
1.
flask run -h 0.0.0.0 -p 50008. You should
/r/flask
https://redd.it/vlz6kt
reddit
Old android phone as flask test server
I know this isn't anything new, but I hadn't considered this before so thought I'd share. Flask apps are pretty lightweight so I pulled out an old...
Sunday Daily Thread: What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/vq4m4j
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your current project or your pet project; whatever you want to share.
/r/Python
https://redd.it/vq4m4j
reddit
Sunday Daily Thread: What's everyone working on this week?
Tell /r/python what you're working on this week! You can be bragging, grousing, sharing your passion, or explaining your pain. Talk about your...
Wednesday Daily Thread: Beginner questions
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/vsc2cv
New to Python and have questions? Use this thread to ask anything about Python, there are no bad questions!
This thread may be fairly low volume in replies, if you don't receive a response we recommend looking at r/LearnPython or joining the Python Discord server at https://discord.gg/python where you stand a better chance of receiving a response.
/r/Python
https://redd.it/vsc2cv
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Thursday Daily Thread: Python Careers, Courses, and Furthering Education!
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/vt4i5k
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python education!
This thread is not for recruitment, please see r/PythonJobs or the thread in the sidebar for that.
/r/Python
https://redd.it/vt4i5k
reddit
Thursday Daily Thread: Python Careers, Courses, and Furthering...
Discussion of using Python in a professional environment, getting jobs in Python as well as ask questions about courses to further your python...
Python is the 2nd most demanded programming language in 2022
https://www.devjobsscanner.com/blog/top-8-most-demanded-languages-in-2022/
/r/Python
https://redd.it/vtiz4o
https://www.devjobsscanner.com/blog/top-8-most-demanded-languages-in-2022/
/r/Python
https://redd.it/vtiz4o
Devjobsscanner
Top 8 Most Demanded Programming Languages in 2024
Ever wondered which is the most demanded programming language in 2024? Although there are more than 200+ programming languages, only few of them are used in the real world industry. Knowing this information is essential to succeed in the developer job industry.…
Humble Software Bundle: Opearation Python 2022
https://www.humblebundle.com/operation-python-2022-software
/r/django
https://redd.it/vu5jzx
https://www.humblebundle.com/operation-python-2022-software
/r/django
https://redd.it/vu5jzx
Humble Bundle
Humble Software Bundle: Operation Python 2022
Learn Python programming through a mix of online courses, video lessons, and ebooks Write Pythonic Code Like a Seasoned Developer. Pay what you want & support charity!
Just finished up a big release for a little side project. I rarely see real-world examples of Flask projects on this sub, so I figured I'd share what I built. It's fairly simple, but happy to answer questions.
http://www.fantasynamesearch.com
/r/flask
https://redd.it/vud22s
http://www.fantasynamesearch.com
/r/flask
https://redd.it/vud22s
Fantasy Name Search
Fantasy Name Search: Dominate the Name Game
Fantasy Name Search is the #1 fantasy team name search engine. It's your one-stop shop for finding a new fantasy team name and fantasy sports analytics.
Jupyter Notebook Competition deadline coming up!
The Jupyter Notebook Competition deadline is fast approaching!
https://preview.redd.it/7zh3i14eyx991.png?width=1920&format=png&auto=webp&s=954265fdc4daad581167051f72f4f17eb33d94bf
Don't miss out on your chance to contribute to a community-driven resource of notebooks on the Copernicus WEkEO platform, AND be in with a chance of winning cash prizes!
Visit: https://www.eumetsat.int/features/new-jupyter-notebook-competition
/r/JupyterNotebooks
https://redd.it/vsotwi
The Jupyter Notebook Competition deadline is fast approaching!
https://preview.redd.it/7zh3i14eyx991.png?width=1920&format=png&auto=webp&s=954265fdc4daad581167051f72f4f17eb33d94bf
Don't miss out on your chance to contribute to a community-driven resource of notebooks on the Copernicus WEkEO platform, AND be in with a chance of winning cash prizes!
Visit: https://www.eumetsat.int/features/new-jupyter-notebook-competition
/r/JupyterNotebooks
https://redd.it/vsotwi
Deploy react inside django as a django app on Heroku
I have worked with deploying django and react separately as separate heroku apps and integrate them. But I don't know how to deploy a structure where the reactapp is inside Django's project directory disguised as a django app. How do you run the npm build on Heroku? I couldn't find any tutorials that does this, can someone help me out here? thanks!
/r/django
https://redd.it/w12hk0
I have worked with deploying django and react separately as separate heroku apps and integrate them. But I don't know how to deploy a structure where the reactapp is inside Django's project directory disguised as a django app. How do you run the npm build on Heroku? I couldn't find any tutorials that does this, can someone help me out here? thanks!
/r/django
https://redd.it/w12hk0
reddit
Deploy react inside django as a django app on Heroku
I have worked with deploying django and react separately as separate heroku apps and integrate them. But I don't know how to deploy a structure...
nbsnapshot - Automated Jupyter Notebook Testing
​
https://preview.redd.it/hfag3h6fyl991.png?width=1201&format=png&auto=webp&s=ce07fd38ec64cdd33578d2157a7c955a82ce4b42
Hi all!
I want to share a project I've been working on to facilitate Jupyter notebook testing!
When analyzing data in a Jupyter notebook, I unconsciously memorize "rules of thumb" to determine if my results are correct. For example, I might print some summary statistics and become skeptical of some outputs if they deviate too much from what I've seen historically. For more complex analysis, I often create diagnostic plots (e.g., a histogram) and check them whenever new data arrives.
Since I constantly repeat the same process, I figured I'd code a small library to streamline this process. nbsnapshot benchmarks cell's outputs with historical results and raises an error if the output deviates from an expected range (by default, 3 standard deviations from the mean). You can see an example in the image accompanying this post.
To learn more, check out the blog post.
I'd love to hear what you think!
/r/IPython
https://redd.it/vrg1yv
​
https://preview.redd.it/hfag3h6fyl991.png?width=1201&format=png&auto=webp&s=ce07fd38ec64cdd33578d2157a7c955a82ce4b42
Hi all!
I want to share a project I've been working on to facilitate Jupyter notebook testing!
When analyzing data in a Jupyter notebook, I unconsciously memorize "rules of thumb" to determine if my results are correct. For example, I might print some summary statistics and become skeptical of some outputs if they deviate too much from what I've seen historically. For more complex analysis, I often create diagnostic plots (e.g., a histogram) and check them whenever new data arrives.
Since I constantly repeat the same process, I figured I'd code a small library to streamline this process. nbsnapshot benchmarks cell's outputs with historical results and raises an error if the output deviates from an expected range (by default, 3 standard deviations from the mean). You can see an example in the image accompanying this post.
To learn more, check out the blog post.
I'd love to hear what you think!
/r/IPython
https://redd.it/vrg1yv
Incoporating lens(df) value into groupby() function
Task 5b: Calculate percentage of people with work experience that are offered a job, the percentage of people with work experience not offered a job, the people with no work experience offered a job and the percentage of people with no work experience not offered a job.
len(df.index)
print(df.index)
output
RangeIndex(start=0, stop=120, step=1)
Tried to put the value of 120 into groupby but failed
​
dfworkexp = (df.groupby('index')['status']
.valuecounts(normalize=True)
.resetindex(name='perc'))
print (dfworkexp)
/r/IPython
https://redd.it/w3isc0
Task 5b: Calculate percentage of people with work experience that are offered a job, the percentage of people with work experience not offered a job, the people with no work experience offered a job and the percentage of people with no work experience not offered a job.
len(df.index)
print(df.index)
output
RangeIndex(start=0, stop=120, step=1)
Tried to put the value of 120 into groupby but failed
​
dfworkexp = (df.groupby('index')['status']
.valuecounts(normalize=True)
.resetindex(name='perc'))
print (dfworkexp)
/r/IPython
https://redd.it/w3isc0
reddit
Incoporating lens(df) value into groupby() function
Task 5b: Calculate percentage of people with work experience that are offered a job, the percentage of people with work experience not offered a...