Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Reloadium - Hot Reloading aka Edit and Continue for Python

​

https://i.redd.it/fyscm8r8fvv81.gif

More details here: https://github.com/reloadware/reloadium

Using is very simple. Just edit your file and hit save (Ctrl-S).

If you guys use PyCharm then you can try out the plugin:

https://plugins.jetbrains.com/plugin/18509-reloadium

It enables hot reloading capabilities in Python like changing code during debugging, fixing errors after exceptions occur, restarting current functions etc.

/r/Python
https://redd.it/ucbzry
A free tool to seed your dev database with real data

A bunch of developers and myself have created RepliByte - an open-source tool to seed a development database from a production database.

Features:

- Support data backup and restore for PostgreSQL, MySQL, and MongoDB
- Replace sensitive data with fake data
- Works on large database (> 10GB) (read Design)
- Database Subsetting: Scale down a production database to a more reasonable size
- Start a local database with the prod data in a single command
- On-the-fly data (de)compression (Zlib)
- On-the-fly data de/encryption (AES-256)
- Fully stateless (no server, no daemon) and lightweight binary
- Use custom transformers

My motivation:

As a developer, creating a fake dataset for running tests is tedious. Plus, it does not reflect real-world data and is painful to keep updated. If you prefer to run your app tests with production data. Then RepliByte is for you as well.

Available for MacOSX, Linux and Windows.

https://github.com/Qovery/replibyte

/r/django
https://redd.it/uc8rc5
Creating a web application that processes data

Will Django allow me to take my (already functional) python program and convert it to a web application that I can access locally for execution?

My program takes some user input(selecting things), processes some data in the background, organizes it in excel, then sends it to my printer. I've been working through some Django tutorials and I'm struggling to see where the Model/View/Template system will allow me to incorporate that functionality into the app?

/r/django
https://redd.it/ucjsrb
New Jupyter Notebook competition

Are you passionate about coding, data science or Earth observation?

https://preview.redd.it/41ijb6p04vv81.png?width=1920&format=png&auto=webp&s=bb0ae5e70d7d1c427e0409abd224a2eda7ddc954

We're looking for bright-minded people from around the world to showcase their skills and develop new Jupyter Notebooks using Copernicus data!

Sound interesting? Find out more here: https://www.eumetsat.int/science-blog/new-jupyter-notebook-competition

/r/JupyterNotebooks
https://redd.it/ucasxr
How to Version Control your Django Project

Hey All,

I wrote a small guide for how I Version Control my Django Projects. If you are interested I would love to get your feedback. https://builtwithdjango.com/blog/django-version-control

It is aimed at the people who are just starting out.

TL;DR of the post is to use a good .gitignore 😃

/r/djangolearning
https://redd.it/ud4pkg
Django horizontal scaling with Kubernetes and Docker on AWS

Hello guys,

I'd like to horizontally scale my Django ecommerce app with Kubernetes and Docker on AWS.

What's the best tutorial available for that? is there any video tutorial that shows you how to scale it properly? I'll be using Redis cache as well.

/r/django
https://redd.it/udd91p
DRF - options for adding/deleting from ManyToMany field

I have a Django/drf backend and wanted opinions on how to handle updating ManyToMany relationships/fields.

For ex let’s say Users are able to favorite many homes on an Airbnb type app. From a single home/listing page would you request all the favorites and then if the user favorited/unfavorited that listing send back the full list of new favorites in the req? Deleting all the current favorites and replacing with this new favorites data? Or some other way? I guess wondering what the different options are and if there’s a way that’s easiest with Django/drf

/r/django
https://redd.it/udmham
Friday Daily Thread: Free chat Friday! Daily Thread

Use this thread to talk about anything Python related! Questions, news, projects and any relevant discussion around Python is permitted!

/r/Python
https://redd.it/ue8us0
What would your Reddit Upvoting Model look like?

I think it is easy to see that Users <-> Posts would be a many-to-many with Comments in between, but how would you deal with keeping track of Upvotes whilst retaining User information?

Was just browsing when the thought came to my mind and I can't come up with a good scalable solution...

/r/django
https://redd.it/uebgfj
Once VueJS mastered, does using VueJS with Django require more time to create sites from scratch compared to solutions like Django with HTMX

Hey everyone,

I work in finance as an analyst but i also happen to be involved in projects where i deploy web apps. Last one i deployed was using this stack : Django + MS SERVER (my company's DB server) + HTMX + Vanilla JS + HTML/CSS.

However, i would like to be more comfortable with JS. I mess around with JS Vanilla and HTMX which helped me make my web app SPA. But i like being close to the industry standards because maybe one day i will develop my own app for a personal business project, or i'd want to become a full time developer and move from finance.

The dilemma is that at my work, i don't have the time of being a real full stack dev. But i also hate libraries like Dash etc and the inflexibility they have. I started playing around with dash and i didn't like writing HTML in a Python file, i just didn't get the point, i'd rather write plain HTML and CSS like it's supposed to be done, it's the same time spent.

So my question is, as with CSS, does learning a front-end JS framework helps you deploy your apps faster once you get

/r/django
https://redd.it/ueu5dz
Saturday Daily Thread: Resource Request and Sharing! Daily Thread

Found a neat resource related to Python over the past week? Looking for a resource to explain a certain topic?

Use this thread to chat about and share Python resources!

/r/Python
https://redd.it/ueyz7b
Just created my first pytest plugin: Pyshot!

Hey guys!

I created a pytest plugin called Pyshot. It is intended to facilitate screenshot taking during testcases using selenium, here are the links if you want to check it!

Package: https://pypi.org/project/pyshot/

Repo: https://github.com/anggelomos/pyshot

&#x200B;

Pyshot demo

/r/Python
https://redd.it/ufhzso