ERROR ImproperlyConfigured: Error loading psycopg2 or psycopg module
I'm currently trying to update a Django rest api on AWS Lambda using the following command.
zappa update dev
However it gives me the following error
Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 502 response code.
When I run the following
zappa tail
I see the error
ImproperlyConfigured: Error loading psycopg2 or psycopg module
Does anyone know how to fix this error? I check requirements.txt file and it has the latest version of both psycopg2 and psycopg2-binary (2.9.10). I don't know why I'm getting the error.
/r/flask
https://redd.it/1honehi
I'm currently trying to update a Django rest api on AWS Lambda using the following command.
zappa update dev
However it gives me the following error
Error: Warning! Status check on the deployed lambda failed. A GET request to '/' yielded a 502 response code.
When I run the following
zappa tail
I see the error
ImproperlyConfigured: Error loading psycopg2 or psycopg module
Does anyone know how to fix this error? I check requirements.txt file and it has the latest version of both psycopg2 and psycopg2-binary (2.9.10). I don't know why I'm getting the error.
/r/flask
https://redd.it/1honehi
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
[D] Structure of Neural Embeddings
https://seanpedersen.github.io/posts/structure-of-neural-latent-space
/r/MachineLearning
https://redd.it/1hogog5
https://seanpedersen.github.io/posts/structure-of-neural-latent-space
/r/MachineLearning
https://redd.it/1hogog5
seanpedersen.github.io
Structure of Neural Embeddings
Another place for thought infusion
Robyn(Web Framework) is deprecating views
Hey Everyone 👋
Robyn is deprecating views soon, and I wanted to share it with the community who is not present in our discord.
For the unaware - (probably this post is not super relevant) - Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
To stay up to date with the PR - you can have a look here - https://github.com/sparckles/Robyn/pull/1096
/r/Python
https://redd.it/1hok999
Hey Everyone 👋
Robyn is deprecating views soon, and I wanted to share it with the community who is not present in our discord.
For the unaware - (probably this post is not super relevant) - Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
To stay up to date with the PR - you can have a look here - https://github.com/sparckles/Robyn/pull/1096
/r/Python
https://redd.it/1hok999
GitHub
GitHub - sparckles/Robyn: Robyn is a Super Fast Async Python Web Framework with a Rust runtime.
Robyn is a Super Fast Async Python Web Framework with a Rust runtime. - sparckles/Robyn
Automated Dataset Generation for Object Detection
# What My Project Does
This project shows how we can generate custom synthetic datasets for training object detection models. Think of it like making your own training data on demand, especially when getting real-world images is a headache.
# Target audience
This project is designed for individuals who want to learn how to create their own datasets for computer vision tasks but are tired of the usual data struggles. It’ll walk you through the whole process, from coming up with ideas for your data to automatically labeling it, so you can skip the endless manual work.
# Comparison
Right now, if you need data to train a custom object detector, you're usually stuck either spending forever labeling stuff yourself or dealing with the hassle of finding and paying for existing datasets. And even then, it might not be exactly what you need. But now, with all these AI vision models and image generators popping up, there's a new way to do things. Instead of the usual manual grind, we can use LLMs and vision models to create the training data we actually need. Since there are tons of these models out there, both free and paid, you've got a lot of choices to find
/r/Python
https://redd.it/1hop3tn
# What My Project Does
This project shows how we can generate custom synthetic datasets for training object detection models. Think of it like making your own training data on demand, especially when getting real-world images is a headache.
# Target audience
This project is designed for individuals who want to learn how to create their own datasets for computer vision tasks but are tired of the usual data struggles. It’ll walk you through the whole process, from coming up with ideas for your data to automatically labeling it, so you can skip the endless manual work.
# Comparison
Right now, if you need data to train a custom object detector, you're usually stuck either spending forever labeling stuff yourself or dealing with the hassle of finding and paying for existing datasets. And even then, it might not be exactly what you need. But now, with all these AI vision models and image generators popping up, there's a new way to do things. Instead of the usual manual grind, we can use LLMs and vision models to create the training data we actually need. Since there are tons of these models out there, both free and paid, you've got a lot of choices to find
/r/Python
https://redd.it/1hop3tn
Reddit
From the Python community on Reddit: Automated Dataset Generation for Object Detection
Explore this post and more from the Python community
Simplify Jupyter Notebook Sharing with This IPYNB to PDF Tool
Hi Pythonistas! 👋
Ever needed to share your Jupyter Notebook as a professional-looking PDF but got stuck fiddling with nbconvert or other complex tools? I’ve found a super simple solution: rare2pdf.com/ipynb-to-pdf/.
✅ Just upload your
I’d love to hear if this saves you some time! Give it a try and let me know what you think. 😊
/r/IPython
https://redd.it/1hp33i0
Hi Pythonistas! 👋
Ever needed to share your Jupyter Notebook as a professional-looking PDF but got stuck fiddling with nbconvert or other complex tools? I’ve found a super simple solution: rare2pdf.com/ipynb-to-pdf/.
✅ Just upload your
.ipynb files. and it converts to a neat PDF in seconds. Perfect for presentations, sharing with non-tech folks, or archiving your work.I’d love to hear if this saves you some time! Give it a try and let me know what you think. 😊
/r/IPython
https://redd.it/1hp33i0
Rare2PDF
IPYNB to PDF Converter – Free & Online
Easily convert IPYNB (Jupyter Notebook) to high-quality PDFs with our free online tool. Perfect for Colab, VS Code, and more!
I made an AI-powered IPython REPL
Hey everyone, I made an AI-powered IPython REPL that lets you understand, debug, and write better code faster. It uses relevant context from your session to suggest the best responses to your questions. You can choose between gpt-4o and claude-3.5-sonnet, I'm planning to add local models soon. You can check out the code on GitHub and install it from PyPI using
Here's a demo:
https://i.redd.it/7ex5dpezdu9e1.gif
/r/IPython
https://redd.it/1hp42eq
Hey everyone, I made an AI-powered IPython REPL that lets you understand, debug, and write better code faster. It uses relevant context from your session to suggest the best responses to your questions. You can choose between gpt-4o and claude-3.5-sonnet, I'm planning to add local models soon. You can check out the code on GitHub and install it from PyPI using
pip install ipychat.Here's a demo:
https://i.redd.it/7ex5dpezdu9e1.gif
/r/IPython
https://redd.it/1hp42eq
GitHub
GitHub - vinayak-mehta/ipychat: An AI extension for IPython that makes it work like Cursor
An AI extension for IPython that makes it work like Cursor - vinayak-mehta/ipychat
What’s your library “stack”?
Hello! I’m switching to Django for my personal projects haven’t spent a lot of energy using Go, which I love but I have had to reimplement a lot from scratch.
I’m curious to know what are your go-to libraries for the most common needs (but feel free to drop any amazing library worth mentioning) so that I can migrate what I usually do in go to Django.
I’ll mention what I’m thinking of using so far:
- Django rest framework to implement rest api (I’ll focus on react + drf for my projects)
- djoser for authentication (I’d need jwt and social)
- celery for async events and crons
- throttling, I think drf offers a solution using django-redis
- Django-impersonate to impersonate users for troubleshooting purposes
- uploading files to s3 instead of local storage
- channels for webhooks and web sockets
- permissions/groups/roles to allow disallow users from accessing other users’ resources (images and documents included).
/r/django
https://redd.it/1houdby
Hello! I’m switching to Django for my personal projects haven’t spent a lot of energy using Go, which I love but I have had to reimplement a lot from scratch.
I’m curious to know what are your go-to libraries for the most common needs (but feel free to drop any amazing library worth mentioning) so that I can migrate what I usually do in go to Django.
I’ll mention what I’m thinking of using so far:
- Django rest framework to implement rest api (I’ll focus on react + drf for my projects)
- djoser for authentication (I’d need jwt and social)
- celery for async events and crons
- throttling, I think drf offers a solution using django-redis
- Django-impersonate to impersonate users for troubleshooting purposes
- uploading files to s3 instead of local storage
- channels for webhooks and web sockets
- permissions/groups/roles to allow disallow users from accessing other users’ resources (images and documents included).
/r/django
https://redd.it/1houdby
Reddit
From the django community on Reddit
Explore this post and more from the django community
How do you manage sending mails with SMTP with all analytics and tracking on SES?
I am looking to have a custom implementation for sending and tracking mails. SES can do tracking, but I want to have a robust mail sending system. I have tried listmonk and it does not track for campaigns and the customizability is limited there. I'm looking to build a custom sender.
Is there anything I should avoid while building this? Is send and forget the right way and forcing SES to manage delivery +other analytics the best way?
Does anyone have some repos with a really good implementation of a mail sending system?
/r/django
https://redd.it/1hoz76e
I am looking to have a custom implementation for sending and tracking mails. SES can do tracking, but I want to have a robust mail sending system. I have tried listmonk and it does not track for campaigns and the customizability is limited there. I'm looking to build a custom sender.
Is there anything I should avoid while building this? Is send and forget the right way and forcing SES to manage delivery +other analytics the best way?
Does anyone have some repos with a really good implementation of a mail sending system?
/r/django
https://redd.it/1hoz76e
Reddit
From the django community on Reddit
Explore this post and more from the django community
Django courses focusing beyond the basics
Most online courses focus on zero-to-one content (introducing the basics of a language or framework). I'm planning on creating micro-courses that go beyond stage one.
These micro-courses,
focus on one outcome
have a series of tasks/objectives to complete (learning by doing)
can be completed within a week by spending a few hours a day and
cover intermediate or advanced concepts
Examples,
1. Implementing webhooks for payment gateways
2. Processing webhook payloads the right way
3. Deploying a Django application on a VPS
4. Developing CLI tools for application housekeeping
5. Monitoring 500 errors in LIVE/PROD servers
6. Designing a backup policy and automating backups
Would you be interested in such micro-courses?
Any topic that you wish to add to this list?
/r/django
https://redd.it/1hpgv15
Most online courses focus on zero-to-one content (introducing the basics of a language or framework). I'm planning on creating micro-courses that go beyond stage one.
These micro-courses,
focus on one outcome
have a series of tasks/objectives to complete (learning by doing)
can be completed within a week by spending a few hours a day and
cover intermediate or advanced concepts
Examples,
1. Implementing webhooks for payment gateways
2. Processing webhook payloads the right way
3. Deploying a Django application on a VPS
4. Developing CLI tools for application housekeeping
5. Monitoring 500 errors in LIVE/PROD servers
6. Designing a backup policy and automating backups
Would you be interested in such micro-courses?
Any topic that you wish to add to this list?
/r/django
https://redd.it/1hpgv15
Reddit
From the django community on Reddit
Explore this post and more from the django community
Looking for remote job as Backend Engineer
Hi,
I have more than 3 years of experience with Python, Django, DRF, Rest APIs, Postgresql, Postgis, GIS, QGIS Plugin Development, LLMs, Generative AI, Git Versioning, and AWS(EC2, S3, Lambda, RDS).
I do have references from my previous clients.
Can you please guide me on how to land a remote job?
Thanks
/r/django
https://redd.it/1hpirb7
Hi,
I have more than 3 years of experience with Python, Django, DRF, Rest APIs, Postgresql, Postgis, GIS, QGIS Plugin Development, LLMs, Generative AI, Git Versioning, and AWS(EC2, S3, Lambda, RDS).
I do have references from my previous clients.
Can you please guide me on how to land a remote job?
Thanks
/r/django
https://redd.it/1hpirb7
Reddit
From the django community on Reddit
Explore this post and more from the django community
Monday Daily Thread: Project ideas!
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1hp9p8c
# Weekly Thread: Project Ideas 💡
Welcome to our weekly Project Ideas thread! Whether you're a newbie looking for a first project or an expert seeking a new challenge, this is the place for you.
## How it Works:
1. **Suggest a Project**: Comment your project idea—be it beginner-friendly or advanced.
2. **Build & Share**: If you complete a project, reply to the original comment, share your experience, and attach your source code.
3. **Explore**: Looking for ideas? Check out Al Sweigart's ["The Big Book of Small Python Projects"](https://www.amazon.com/Big-Book-Small-Python-Programming/dp/1718501242) for inspiration.
## Guidelines:
* Clearly state the difficulty level.
* Provide a brief description and, if possible, outline the tech stack.
* Feel free to link to tutorials or resources that might help.
# Example Submissions:
## Project Idea: Chatbot
**Difficulty**: Intermediate
**Tech Stack**: Python, NLP, Flask/FastAPI/Litestar
**Description**: Create a chatbot that can answer FAQs for a website.
**Resources**: [Building a Chatbot with Python](https://www.youtube.com/watch?v=a37BL0stIuM)
# Project Idea: Weather Dashboard
**Difficulty**: Beginner
**Tech Stack**: HTML, CSS, JavaScript, API
**Description**: Build a dashboard that displays real-time weather information using a weather API.
**Resources**: [Weather API Tutorial](https://www.youtube.com/watch?v=9P5MY_2i7K8)
## Project Idea: File Organizer
**Difficulty**: Beginner
**Tech Stack**: Python, File I/O
**Description**: Create a script that organizes files in a directory into sub-folders based on file type.
**Resources**: [Automate the Boring Stuff: Organizing Files](https://automatetheboringstuff.com/2e/chapter9/)
Let's help each other grow. Happy
/r/Python
https://redd.it/1hp9p8c
Django courses focusing beyond the basics
Most online courses focus on zero-to-one content (introducing the basics of a language or framework). I'm planning on creating micro-courses that go beyond stage one.
These micro-courses,
focus on one outcome
have a series of tasks/objectives to complete (learning by doing)
can be completed within a week by spending a few hours a day and
cover intermediate or advanced concepts
Examples,
1. Implementing webhooks for payment gateways
2. Processing webhook payloads the right way
3. Deploying a Django application on a VPS
4. Developing CLI tools for application housekeeping
5. Monitoring 500 errors in LIVE/PROD servers
6. Designing a backup policy and automating backups
Would you be interested in such micro-courses?
Any topic that you wish to add to this list?
/r/djangolearning
https://redd.it/1hpgxfs
Most online courses focus on zero-to-one content (introducing the basics of a language or framework). I'm planning on creating micro-courses that go beyond stage one.
These micro-courses,
focus on one outcome
have a series of tasks/objectives to complete (learning by doing)
can be completed within a week by spending a few hours a day and
cover intermediate or advanced concepts
Examples,
1. Implementing webhooks for payment gateways
2. Processing webhook payloads the right way
3. Deploying a Django application on a VPS
4. Developing CLI tools for application housekeeping
5. Monitoring 500 errors in LIVE/PROD servers
6. Designing a backup policy and automating backups
Would you be interested in such micro-courses?
Any topic that you wish to add to this list?
/r/djangolearning
https://redd.it/1hpgxfs
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Is there a way to use split screen in Visual Studio Code to see HTML template changes in real time?
Or is there another IDE that can be used to visualize frontend changes?
/r/flask
https://redd.it/1hpjfua
Or is there another IDE that can be used to visualize frontend changes?
/r/flask
https://redd.it/1hpjfua
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
New to freelancing
Hello!
For those of you who started freelancing recently and made it work, how do you promote yourself and/or your business? What channels do you use to find quality customers?
I’ve beer working with Python for more than 8 years now and I’d want to build a business around it.
Thank you in advance!
/r/Python
https://redd.it/1hpo5zz
Hello!
For those of you who started freelancing recently and made it work, how do you promote yourself and/or your business? What channels do you use to find quality customers?
I’ve beer working with Python for more than 8 years now and I’d want to build a business around it.
Thank you in advance!
/r/Python
https://redd.it/1hpo5zz
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Flask project front end design and modification for non-technical web site owners
I'm creating a website for a company that want their clients to be able to login to a portal and submit jobs for the company to complete. All of this will be handled with Flask and the aesthetic and design of these portal pages is not that significant.
For the front end, the design is much more important and I don't want to have to design and hand craft every page. I really want to be able to separate myself as the developer as much as possible from the designer or content producers for the site. What options are there for incorporating something that will easily let the company design and update the front end pages themselves (or employ a designer to do so)?
There will only be a handful of pages (home page, about us, contact us, Ts & Cs kind of thing) so using a headless CMS would just be a monthly expense for something that isn't going to change or be used that much, but is something I still want to separate myself as the developer from. It would also mean that I can just crack on with solving the technical aspects of letting clients submit jobs rather than
/r/flask
https://redd.it/1hpy3xs
I'm creating a website for a company that want their clients to be able to login to a portal and submit jobs for the company to complete. All of this will be handled with Flask and the aesthetic and design of these portal pages is not that significant.
For the front end, the design is much more important and I don't want to have to design and hand craft every page. I really want to be able to separate myself as the developer as much as possible from the designer or content producers for the site. What options are there for incorporating something that will easily let the company design and update the front end pages themselves (or employ a designer to do so)?
There will only be a handful of pages (home page, about us, contact us, Ts & Cs kind of thing) so using a headless CMS would just be a monthly expense for something that isn't going to change or be used that much, but is something I still want to separate myself as the developer from. It would also mean that I can just crack on with solving the technical aspects of letting clients submit jobs rather than
/r/flask
https://redd.it/1hpy3xs
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Making a custom model function as a login user?
Hey there, I've ran into an issue where I've been trying to create a custom model which has some basic data and then log-in functionality? I'm able to log in as a superuser but not using the data in my custom model. (Migrations have been made) What am I doing wrong here? This is the custom model which I'm currently using.
class Resident(AbstractUser):
"""
Custom User model representing HOA residents.
"""
verbosename = 'Resident'
firstname = models.CharField(maxlength=50)
lastname = models.CharField(maxlength=50)
address = models.CharField(maxlength=255, blank=True)
phonenumber = models.CharField(maxlength=25)
def str(self):
return
f"{self.firstname} {self.lastname}"
groups = models.ManyToManyField(
'auth.Group',
relatedname='residentgroups',
/r/djangolearning
https://redd.it/1hpooej
Hey there, I've ran into an issue where I've been trying to create a custom model which has some basic data and then log-in functionality? I'm able to log in as a superuser but not using the data in my custom model. (Migrations have been made) What am I doing wrong here? This is the custom model which I'm currently using.
class Resident(AbstractUser):
"""
Custom User model representing HOA residents.
"""
verbosename = 'Resident'
firstname = models.CharField(maxlength=50)
lastname = models.CharField(maxlength=50)
address = models.CharField(maxlength=255, blank=True)
phonenumber = models.CharField(maxlength=25)
def str(self):
return
f"{self.firstname} {self.lastname}"
groups = models.ManyToManyField(
'auth.Group',
relatedname='residentgroups',
/r/djangolearning
https://redd.it/1hpooej
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
(when) do i need to make things async
currently writing a mini reddit clone with flask and sqlite for the backend. i'm concerned that once things scale that i'll need better async support that flask cannot provide. how often is this a legitimate concern? i understand there are alternatives like quart but i want to know if it's flask that will likely limit me, if i need to be thinking about async functions at all, and if so what scenarios those would be.
/r/flask
https://redd.it/1hpz4ob
currently writing a mini reddit clone with flask and sqlite for the backend. i'm concerned that once things scale that i'll need better async support that flask cannot provide. how often is this a legitimate concern? i understand there are alternatives like quart but i want to know if it's flask that will likely limit me, if i need to be thinking about async functions at all, and if so what scenarios those would be.
/r/flask
https://redd.it/1hpz4ob
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Planning flask project
I'm mostly self taught and am coming more from ds than webdev. The only webdev / html / css / js experience I have is from following Miguel's tutorial for a small blog.
I am building a website that hosts some of my ML models and takes in realtime data, then performs inference. The data pipeline is done, it uses a pub sub model and pushes the data to Redis.
I'm wondering:
- Is flask suitable for this as it doesn't support async intrinsically. The data pipeline is async and handles the data no issue, I tested it to 100's of GB a day. I would hate to have to rewrite. Is it as simple as switching to quart if need be?
- I would like nice realtime graphs to display everything. How would I let the website know that a new data point has been pushed? Somehow I need Redis to talk to flask.
- How would I make some kind of graph to display financial data. Can bootstrap do this or do I need some js library.
- I'm writing it using blueprints. Are there any repositories / sites that have already made blueprints. Seems like a waste
/r/flask
https://redd.it/1hq3zep
I'm mostly self taught and am coming more from ds than webdev. The only webdev / html / css / js experience I have is from following Miguel's tutorial for a small blog.
I am building a website that hosts some of my ML models and takes in realtime data, then performs inference. The data pipeline is done, it uses a pub sub model and pushes the data to Redis.
I'm wondering:
- Is flask suitable for this as it doesn't support async intrinsically. The data pipeline is async and handles the data no issue, I tested it to 100's of GB a day. I would hate to have to rewrite. Is it as simple as switching to quart if need be?
- I would like nice realtime graphs to display everything. How would I let the website know that a new data point has been pushed? Somehow I need Redis to talk to flask.
- How would I make some kind of graph to display financial data. Can bootstrap do this or do I need some js library.
- I'm writing it using blueprints. Are there any repositories / sites that have already made blueprints. Seems like a waste
/r/flask
https://redd.it/1hq3zep
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
How to structure project from beginning?
Have kind of a random question about django project structure and apps.
Let’s say you have an idea you want to test and get an MVP up pretty quickly. The end idea is complex and has many models and functionality.
Is it a good idea to separate functionally based on models into apps when you start or refactor later?
Let’s say as an example I have users, comments, projects, messages, and more.
Thanks!
/r/djangolearning
https://redd.it/1hp7sbq
Have kind of a random question about django project structure and apps.
Let’s say you have an idea you want to test and get an MVP up pretty quickly. The end idea is complex and has many models and functionality.
Is it a good idea to separate functionally based on models into apps when you start or refactor later?
Let’s say as an example I have users, comments, projects, messages, and more.
Thanks!
/r/djangolearning
https://redd.it/1hp7sbq
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community