deployment with nginx and gunicorm
Hello there,
Should I deploy my flask application with gunicorn, and nginx in the same container?
And for every flask microservice there should be an nginx deployed? like 5 nginx for 5 microservice ?
It feels like kind of antipattern (but what do I know) but recently I came across something like that.
Also, could you share examples of production level deployment, if you know any examples out there
Thanks, and sorry for my bad english, if any mistakes
/r/flask
https://redd.it/1fw45v5
R Were RNNs All We Needed?
https://arxiv.org/abs/2410.01201
The authors (including Y. Bengio) propose simplified versions of LSTM and GRU that allow parallel training, and show strong results on some benchmarks.
/r/MachineLearning
https://redd.it/1fvg7qr
Lazywarden: Automate your Bitwarden Backups and Imports with Total Security! ☁️🔐🖥️
What My Project Does
A few weeks ago, I launched Lazywarden, a tool designed to make life easier for those of us who use Bitwarden or Vaultwarden. It automates the process of backing up and importing passwords, including attachments, in a secure and hassle-free way. You can check it out here: https://github.com/querylab/lazywarden
Target Audience
Anyone who wants to automate backups and imports of passwords securely and efficiently, while using Bitwarden or Vaultwarden.
Comparison
While Bitwarden is excellent for managing passwords, automating processes like cloud backups, integrating with other services, or securing your data locally can be tricky. Lazywarden simplifies all this with a script that does the heavy lifting for you. 😎
I'm open to any feedback, suggestions, or ideas for improvement. Feel free to share your thoughts or contribute to the project! 🤝
Thanks for reading, and I hope you find Lazywarden as useful as I do. 💻🔑
/r/Python
https://redd.it/1fvw58w
PEP 758 – Allow except
and except*
expressions without parentheses
PEP 758 – Allow except
and except*
expressions without parentheses https://peps.python.org/pep-0758/
# Abstract
This PEP proposes to allow unparenthesized except
and except*
blocks in Python’s exception handling syntax. Currently, when catching multiple exceptions, parentheses are required around the exception types. This was a Python 2 remnant. This PEP suggests allowing the omission of these parentheses, simplifying the syntax, making it more consistent with other parts of the syntax that make parentheses optional, and improving readability in certain cases.
# Motivation
The current syntax for catching multiple exceptions requires parentheses in the except
expression (equivalently for the except*
expression). For example:
try:
...
except (ExceptionA, ExceptionB, ExceptionC):
...
While this syntax is clear and unambiguous, it can be seen as unnecessarily verbose in some cases, especially when catching a large number of exceptions. By allowing the omission of parentheses, we can simplify the syntax:
try:
...
except ExceptionA, ExceptionB, ExceptionC:
...
This change would bring the syntax more in line with other comma-separated lists in Python, such
/r/Python
https://redd.it/1fvnlol
70+ Python Leetcode Problems solved in 5+hours (every data structure)
https://m.youtube.com/watch?v=lvO88XxNAzs
I love Python, it’s my first language and the language that got me into FAANG (interviews and projects).
It’s not my day to day language (now TypeScript) but I definitely think it’s the best for interviews and getting started which is why I used it in this video.
Included a ton of Python tips, as well as programming and software engineering knowledge. Give a watch if you want to improve on these and problem solving skills too 🫡
/r/Python
https://redd.it/1fvjnhz
Which docker courses should i learn
Im a self thought backend devloper and i want to learn docker for django in YouTube but all videos are short like 30 minute full course I don't know which one is a right full can you guys please send my docker course link that worked for you sorry for my bad English grammar😑
/r/django
https://redd.it/1fvdu89
website like CMD
https://terminalcss.xyz/#NavigationList
/r/flask
https://redd.it/1fuj3w8
ryp: R inside Python
Excited to release ryp, a Python package for running R code inside Python! ryp makes it a breeze to use R packages in your Python projects, and includes out-of-the-box support for inline plotting in Jupyter notebooks.
https://github.com/Wainberg/ryp
/r/IPython
https://redd.it/1fv0f20
Django (+ React) Tutorials!
Hi all, since a year I'm creating Django (and React) tutorials. I have covered topics like:
- Creating a Django & React app.
- Deploying Django & Django + React apps on Azure and Render
- Creating Calendars and Charts for Django & React.
- Login and Authentication Django + React
Do you guys have any recommendations on topics that could be interesting for you?
My channel: CBIAnalytics/featured">CBI Analytics - YouTube
/r/django
https://redd.it/1fv3pzv
Is there a quick and easy to understand Django application that's in prod
Noob here , new to my team and I am looking at a huge project that is lot of spahgetti code with no logs (except for very few that help our team track down very very important stuff). Also written by multiple people so there is no single convention. What is the best and quickest way for me to ramp up? So far I've tried this:
1. Learnt some from the ER diagram using pgadmin4 (database is postgres)
2. Extended existing django.test testcases.
3. Old school- ran through some usecases from start to end.
4. Used code assist on some functions ( wouldn't it be beautiful if there was a project assist? that could read all files and explain stuff?)
There's still lots to understand and I am not able to contribute as much as I'd like to without going through lot of corrections and suggestions in my code reviews.
/r/django
https://redd.it/1fv0t2z
Not looking for a Django job
Learning Python the Django is exciting to me because it opens up a world of possibilities and things I can create.
I’m excited that I can actually build something from nothing and turn it into a business ( what I’m currently doing).
But it seems that most people posting here are learning and building the same to do app so they can then get a job. I mean I know we all have to eat and pay rent, but shouldn’t the first priority in learning to code be to create cool things that people will use and pay you? And shouldn’t getting a job building for a large company be plan b?
Maybe I’m being unrealistic or maybe different strokes for different folks, but I’d rather build my stuff and get paid a fraction than work for someone else
/r/django
https://redd.it/1fusrjw
Python 3.13.0 release candidate 3 released
> This is the final release candidate of Python 3.13.0
> This release, 3.13.0rc3, is the final release preview (no really) of 3.13. This release is expected to become the final 3.13.0 release, barring any critical bugs being discovered. The official release of 3.13.0 is now scheduled for Monday, 2024-10-07.
> This extra, unplanned release candidate exists because of a couple of last minute issues, primarily a significant performance regression in specific workloads due to the incremental cyclic garbage collector (introduced in the alpha releases). We decided to roll back the garbage collector change in 3.13 (and continuing work in 3.14 to improve it), apply a number of other important bug fixes, and roll out a new release candidate.
https://pythoninsider.blogspot.com/2024/10/python-3130-release-candidate-3-released.html?m=1
/r/Python
https://redd.it/1fusnfy
In search of exemplars
There have been lots of "best practice" questions over the years, but I'm looking for exemplars.
Projects that are done so well that they are (or are approaching) the gold standard of Pythonic ideals.
What projects have you worked on, or encountered that exemplified the best of Python's aspirations? The ones you can point to and definitively say "Here! Do it like this!"
/r/Python
https://redd.it/1fujcje
[P] Just-in-Time Implementation: A Python Library That Implements Your Code at Runtime
Hey r/MachineLearning !
You know how we have Just-in-Time Compilation? Well, I thought, "Why stop there?" So I created Just-in-Time Implementation - a Python library that writes your code for you using AI. Yes, really!
Here's a taste of what it can do:
from jit_implementation import implement
@implement
class Snake:
"""Snake game in pygame. Initializing launches the game."""
if __name__ == "__main__":
Snake()
# Believe it or not, this actually works!
I started this as a joke, but then I got carried away and made it actually work. Now I'm not sure if I should be proud or terrified.
# How it works:
1. You write a function or class signature and a docstring.
2. You slap the `@implement` decorator on it.
3. The implementation is generated on-demand when you call the function or instantiate the class. Lazy coding at its finest!
# Some "features" I'm particularly amused by:
* It's the ultimate lazy programming tool. The code doesn't even exist until you run it!
* You can define
/r/MachineLearning
https://redd.it/1fujbuz
Having trouble deploying with Vercel, would appreciate any help
https://github.com/MHussein311/text-behind-image
Above is the repo, below is the error.
Error: A Serverless Function has exceeded the unzipped maximum size of 250 MB. : https://vercel.link/serverless-function-size
I was suspecting it had something to do with rembg and onxruntimegpu but I don't think they're gonna be anywhere near 250 MB.
/r/flask
https://redd.it/1fugw3w
What does everyone use for Django emails?
Hi, I'm wondering what everyone uses for email templates and sending. I'm a hobbist but have a couple random sites, one with 800 users. I've always used the Django emails and setup templates for them within Django. I know this is my skill level but they always look basic and blah. Is there a better way?
/r/django
https://redd.it/1fvzdgt
Can someone please tell briefly the difference Flask-Dance (with SQLAlchemy) with and without Flask Security
/r/flask
https://redd.it/1fttz97
Learn How to Use JSON as a Small Database for Your Py Projects by Building a Hotel Accounting System
This is the first free tutorial designed to help beginners learn how to use JSON to create a simple database for their projects.
It also prepares developers for the next two tutorials in our "Learn by Build" series, where we'll cover how to use the requests
library, build asynchronous code, and work with threads.
and by time we will add extra more depth projects to enhance your pythonic skills
find tutorial in github https://github.com/rankap/learn\_by\_build/tree/main/tut\_1\_learn\_json
/r/Python
https://redd.it/1fvmvlj
[HIRING] Experienced Django Backend Developer Seeking Opportunities
/r/django
https://redd.it/1fvrjll
Friday Daily Thread: r/Python Meta and Free-Talk Fridays
# Weekly Thread: Meta Discussions and Free Talk Friday 🎙️
Welcome to Free Talk Friday on /r/Python! This is the place to discuss the r/Python community (meta discussions), Python news, projects, or anything else Python-related!
## How it Works:
1. Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
2. Community Pulse: Discuss what you feel is working well or what could be improved in the /r/python community.
3. News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
## Guidelines:
All topics should be related to Python or the /r/python community.
Be respectful and follow Reddit's Code of Conduct.
## Example Topics:
1. New Python Release: What do you think about the new features in Python 3.11?
2. Community Events: Any Python meetups or webinars coming up?
3. Learning Resources: Found a great Python tutorial? Share it here!
4. Job Market: How has Python impacted your career?
5. Hot Takes: Got a controversial Python opinion? Let's hear it!
6. Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
/r/Python
https://redd.it/1fvm1no
Django AI Assistant for VS Code
Hey guys our team just launched a VS Code extension that helps devs use Django. It's basically an AI chat (RAG) system trained on the Django docs that you can chat with inside of VS Code. Should be helpful in answering basic to more advanced question, generating code, etc (really anything Django related)!
https://marketplace.visualstudio.com/items?itemName=buildwithlayer.django-integration-expert-Gus30
/r/djangolearning
https://redd.it/1fvf3bk
I wrote a library that adds a @depends() decorator for FastAPI endpoints
I always missed being able to decorate my endpoints in FastAPI with decorators like @authorized()
, @cached(max_age=60)
, etc. but making decorators work with FastAPI endpoints and their dependencies proved surprisingly difficult.
I have now written fastapi-decorators which adds a @depends()
decorator that you can use to decorate your endpoints with - with full FastAPI support :)
# What My Project Does
It allows you to add FastAPI dependencies to your endpoints with the @depends()
decorator:
@app.get("/users/{user_id}")
@depends(Depends(verify_auth_token))
def get_user_by_user_id(user_id: int):
...
@depends()
:@authorize()
for authorizing requests@rate_limit(max=5, period=60)
for rate-limiting endpoints@cache(max_age=5)
for caching responses if you have expensive route operations@log_request()
for logging incoming requests@handle_error()
for catching exceptions and returning custom responsesThursday Daily Thread: Python Careers, Courses, and Furthering Education!
# Weekly Thread: Professional Use, Jobs, and Education 🏢
Welcome to this week's discussion on Python in the professional world! This is your spot to talk about job hunting, career growth, and educational resources in Python. Please note, this thread is not for recruitment.
---
## How it Works:
1. Career Talk: Discuss using Python in your job, or the job market for Python roles.
2. Education Q&A: Ask or answer questions about Python courses, certifications, and educational resources.
3. Workplace Chat: Share your experiences, challenges, or success stories about using Python professionally.
---
## Guidelines:
- This thread is not for recruitment. For job postings, please see r/PythonJobs or the recruitment thread in the sidebar.
- Keep discussions relevant to Python in the professional and educational context.
---
## Example Topics:
1. Career Paths: What kinds of roles are out there for Python developers?
2. Certifications: Are Python certifications worth it?
3. Course Recommendations: Any good advanced Python courses to recommend?
4. Workplace Tools: What Python libraries are indispensable in your professional work?
5. Interview Tips: What types of Python questions are commonly asked in interviews?
---
Let's help each other grow in our careers and education. Happy discussing! 🌟
/r/Python
https://redd.it/1fuuq86
P Paper Central, first portal to bring together all key sources in one place, including arXiv, Hugging Face paper pages, GitHub, and conference proceedings.
Hugging Face launched Paper Central today, the most up-to-date information on the latest research papers.
app: https://huggingface.co/spaces/huggingface/paper-central
post: https://x.com/IAMJBDEL/status/1841627341195510256
/r/MachineLearning
https://redd.it/1fuy2qk
Isolation class per user
Does anyone know a way to store a per user class object in Flask? The idea is to access local tables (e.g. after the user filters the data) without having to create a new instance after the request. I work on Pandas, so dumping it into session is probably not an option - too much data. The global class is also out of the question due to many users - data mixing.
/r/flask
https://redd.it/1fukv3q
Discussion What resource do you use to keep up to date on ML research?
In my day job, I work on recommender and search systems, and I find it hard to keep current on the latest developments relating to my work. I can find time to read maybe one new paper a week (unless it’s directly needed for my work) but disentangling the signal from the noise is the hard part. I’m curious how everyone else choose and find the relevant papers, blog posts, or articles to read for your specific domain?
/r/MachineLearning
https://redd.it/1fu7gls
One Year of Python and Django - Need Some Guidance 🙏
Hey everyone! 👋
I’ve spent a year learning Python and another year mastering Django. Along the way, I’ve built skills in MySQL, HTML, CSS, JavaScript, GitHub, Django Channels, and Django REST framework. I’ve also done projects like an e-commerce site, a real-time chat app, To dolist, and CRUD apps.
Right now, I’m a self-taught backend developer with no one to guide me. I’ve applied to a lot of jobs but haven’t had any luck. Can someone help me out? 😊
/r/django
https://redd.it/1fueb0c
I created a Flask-based Blog App with Tons of Features! 🔥
Hey r/flask!
I just wanted to share a fun little project I’ve been working on – **FlaskBlog**! It’s a simple yet powerful blog app built with Flask. 📝
What’s cool about it?
Admin panel for managing posts
Light/Dark mode (because who doesn’t love dark mode?)
Custom user profiles with profile pics
Google reCAPTCHA v3 to keep the bots away
Docker support for easy deployment
Multi-language support: 🇬🇧 English, 🇹🇷 Türkçe, 🇩🇪 Deutsch, 🇪🇸 Español, 🇵🇱 Polski, 🇫🇷 Français, 🇵🇹 Português, 🇺🇦 Українська, 🇷🇺 Русский, 🇯🇵 日本人, 🇨🇳 中国人
Mobile-friendly design with TailwindCSS
Post categories, creation, editing, and more!
Share posts directly via X (formerly Twitter)
Automated basic tests with Playwright
Time zone awareness for all posts and comments
Post banners for more engaging content
Easily sort posts on the main page
Detailed logging system with multi-level logs
Secure SQL connections and protection against SQL injection
Sample data (users, posts, comments) included for easy testing
You can check it out, clone it, and get it running in just a few steps. I learned a ton while building this, and I’m really proud of how it turned out! If you’re into Flask or just looking for a simple blog template, feel free to give it
/r/flask
https://redd.it/1ful4ed
Looking for back end devs (specifically python flask devs) to help a team of programmers and designers build a dating app marketed towards Ethically non-monogamous people. This is Revshare.
Currently we have a base app with some swiping functionaility. We have a lot of features in mind that cater to the ENM community, such as group chats and a calendar where you can schedule dates. We also have other features that we feel are good to put in a dating up.
Currently our active team members are mostly from asia so it would be great to have someone from asia as well(though this isnt a hard requirement, just a preference.)
/r/flask
https://redd.it/1fuetqa
Yami - A music player made with Tkinter
This is my high school project and wanted to share it
**Github Link:** [https://github.com/DevER-M/yami](https://github.com/DevER-M/yami)
**Image:** [**https://imgur.com/a/rfL41xg**](https://imgur.com/a/rfL41xg)
**Some of the features:**
* ***mp3 , flac, and many audio formats supported for playback***
* ***Clean UI***
* ***Can download music with art cover***
* ***it is also asynchronous***
**Libraries used:**
* customtkinter
* spotdl
* mutagen
**Target audience:** This project will be useful for people who do not want ads and want a simple user interface to play music
**Comparison: There are currently no projects that have all the features covered and is made with tkinter**
To use this install all requirements in the .txt file and you are good to go
**RoadMap:I will not be actively developing it but i will update it now and then**
A follow would be nice! [https://github.com/DevER-M](https://github.com/DevER-M)
/r/Python
https://redd.it/1fu9kox