Looking for a Job Urgently.
Hey guys, i know this is not the place for this and i know its a long shot, but i think it is worth a shot.
my name is Goodluck, 20 years old.
i recently wrote my final exams in college, so i'm almost a college graduate in Computer science. i need a job as soon as possible. I'm proficient in python and can build flask apps. i am a fast learner, so the things i don't know, i can pick up on the job without being a burden or slowing down the workflow. i know some people would advice to get an official job, but i haven't been lucky enough to get one. Most of the ones i've seen on twitter were either closed or just scams to get me to create an account with the job application service. I've applied for a few and i got rejected in all.
I'm looking for a python backend entry/intern role. I've never really worked in a real life industry since i mostly learnt from tutorials on Youtube and torrent courses, but i know i can handle an intern role. I don't mind working as an assistant to someone and i don't
/r/flask
https://redd.it/1ezok6c
flash message.. show only 1 at a time.
how can I clear the current flash message before showing another.
I don't want to have a list of them show on the screen.
this is my code for show the messages
<footer class="mt-auto fixed-bottom">
{% with messages = get_flashed_messages(with_categories=true) %}
{% if messages %}
{% for category, message in messages %}
{% if category == 'message' %}
<div class="alert alert-warning" role="alert">
{% else %}
<div class="alert alert-{{ category }}" role="alert">
{% endif %}
{{ message }}
</div>
{% endfor %}
{% endif %}
{% endwith %}
</footer>
/r/flask
https://redd.it/1ezde6j
How to schedule a daily recurring function?
Hello everyone
So I built a basic backend and was wondering - how can I implement a function that has to run for example every day at 1pm?
Is there a classic way in Flask to do this?
Thank you very much!
/r/flask
https://redd.it/1f097gr
Flask Full Tutorial For Beginners
https://youtu.be/klaRFL8UfNs?si=bopWI1sgWqTwJFT8
/r/flask
https://redd.it/1f09ctm
Make-like task runner in Python
I made a complete Make-like build tool & task runner in Python.
I wanted to adopt Make's scheme of rules, targets, recipes, and dependencies mainly because it's simple, intuitive, and widely used.
Inspiration for the project came from using doit for similar tasks, and growing tired of the confusing API. There are other similar tools out there, but what I wanted was a lightweight, easy-to-use, flexible, and well documented task runner & dependency resolver for a data processing pipeline in Python.
GitHub: https://github.com/gird-dev/gird
Simple example & comparison with doit: https://stackoverflow.com/a/77752742
Rule definition example: https://github.com/gird-dev/gird?tab=readme-ov-file#example-girdfilepy
/r/Python
https://redd.it/1f028a6
No vote of non-confidence as a result of recent events
Here is the python.org discussion affirming the Steering Council's actions with respect to Tim Peters, David Mertz, and Karl Knechtel.
/r/Python
https://redd.it/1f00qdo
Django Full Course for Beginners
https://youtu.be/6whz7Ujfpw0?si=sw2A2G1VifKbdVBf
/r/djangolearning
https://redd.it/1ezhuec
Hiring Remote Frontend Developer
Hi everyone, we have added a new job on our platform. If you are looking for a Remote Frontend Developer job please check the job link below.
Role - Remote Frontend Developer (Remote, Full Time)
Job Link - https://devloprr.com/jobs#283
/r/flask
https://redd.it/1ezxl8s
Tetris in Python - Tutorial
Hello friends!
I am a senior game developer and have prepared a video for beginners on how to make Tetris in Python.
Tetris in Python for Beginners | Programming Basic Concepts - YouTube
Enjoy!
/r/Python
https://redd.it/1ezjm77
Best way to manage sockets with django
Hey, what is the best way to manage sockets with Django? I tried using Daphne, but it didn’t work well for me. It was working fine for a while, but then I had trouble restarting the Daphne server, even after restoring the configuration to the last working state. I’ve had enough of Daphne. Are there any good alternatives?
/r/django
https://redd.it/1ezmm1y
Django News - Wagtail 6.2.1 release
https://django-news.com/issues/247
/r/django
https://redd.it/1ezfegd
Example: Django + NextJS + JWT Authentication
https://github.com/kalvincalimag/django-nextjs-jwt-starter
/r/django
https://redd.it/1ez8v9l
Would a Django-Next.js-JWT Authentication Starter Kit be Useful?
I've been toying with the idea of putting together a Django-Next.js-JWT integration specifically designed for handling authentication. Here’s what I’m thinking: using Django Rest Framework (DRF) along with simple_jwt for the backend, complemented by a custom admin panel using Jazzmin. On the frontend, Next.js would be used purely for consuming this setup, focusing solely on authentication boilerplate.
However, I’m curious about your thoughts on this. Given the existence of NextAuth, I wonder if this effort might be redundant. Do you think there's still value in having a dedicated Django-Next.js-JWT starter kit for those who prefer a more tailored approach or need specific backend customization?
I'd love to hear what you think about this idea. Do you think it's worth the effort, or should I reconsider? Your thoughts would really help me out!
/r/django
https://redd.it/1ez5a82
New Django Library: Django Action Trigger
It's been a while since I’ve shared something, but I’m excited to announce the release of a new Python library: Django Action Triggers.
This project is inspired by an older one I built a few years ago (django-email-signals). Django Action Triggers is a library that allows you to trigger actions based on database changes in your Django application.
It supports webhook integration and can send messages to brokers such as Kafka and RabbitMQ. You can easily set up actions to be triggered by specific events, all configurable through the front end.
What My Project Does
It allows you to configure triggers where a trigger is essentially watching out for some kind of database change. This is done using signals (post_save, pre_save, etc).
Alongside these triggers, you can configure some kind of action to take place. For now, this only will allow you to hit a webhook, or send a message to a message broker (RabbitMQ and Kafka supported).
Target Audience
At the moment, this is a toy project to get me comfortable write code that's supposed to be extensible again. However, would be nice if this eventually reaches production.
Comparison
From what I've seen so far, at the moment there isn't anything comparable unless you consider setting everything up
/r/django
https://redd.it/1eyyvt9
Sunday Daily Thread: What's everyone working on this week?
# Weekly Thread: What's Everyone Working On This Week? 🛠️
Hello /r/Python! It's time to share what you've been working on! Whether it's a work-in-progress, a completed masterpiece, or just a rough idea, let us know what you're up to!
## How it Works:
1. Show & Tell: Share your current projects, completed works, or future ideas.
2. Discuss: Get feedback, find collaborators, or just chat about your project.
3. Inspire: Your project might inspire someone else, just as you might get inspired here.
## Guidelines:
Feel free to include as many details as you'd like. Code snippets, screenshots, and links are all welcome.
Whether it's your job, your hobby, or your passion project, all Python-related work is welcome here.
## Example Shares:
1. Machine Learning Model: Working on a ML model to predict stock prices. Just cracked a 90% accuracy rate!
2. Web Scraping: Built a script to scrape and analyze news articles. It's helped me understand media bias better.
3. Automation: Automated my home lighting with Python and Raspberry Pi. My life has never been easier!
Let's build and grow together! Share your journey and learn from others. Happy coding! 🌟
/r/Python
https://redd.it/1f0jb7c
Doing testing in flask application.
Hi I am build an web application in flask using flask sqlalchemy and flask login for now.
Here is my conftest.py
file
from app import createapp, db
from config import TestConfig
from flasklogin import FlaskLoginClient
import pytest
@pytest.fixture(scope="session")
def app():
app = createapp(TestConfig)
app.testclientclass = FlaskLoginClient
with app.appcontext():
db.createall()
yield app
@pytest.fixture(scope="session")
def client(app):
return app.testclient()
here is my test_auth.py
def testsignupget(client):
res = client.get("/auth/signup")
assert b"<h2>Register Form</h2>" in res.data
def testsignuppost(client, app):
res = client.post("/auth/signup", data={
/r/flask
https://redd.it/1f0dak2
Django site ready - but having trouble deploying in azure as web app or docker (inexperienced)
Hey y’all! Been working on a project and ready to drop the MVP on azure for UAT. But even though I’m azure fundamentals certified I am lacking in the deployment department and can’t quite get my azure web app up and clearing a 200 status code. Looking for help or even a recommendation for experienced help to get me familiar with the process.
Here’s where I’m at:
1. Django project with 2 apps, email and Postgres DB, all working in dev
2. Have a “deployment.py” file that is referenced if os.environ() finds an azure host name, otherwise debug version of settings.py is used
3. Deployed the app via GitHub repo connected to azure. In the deployment logs I get a warning that “Django must be in the requirements.py file” but it is. No other errors seen
4. When accessing the webpage using the azure temporary url I get a 504 error.
5. I can’t troubleshoot much further since I can’t find where other logs are located and the documentation I have found is outdated and doesn’t match the current azure UI
Any help or leads for troubleshooting are appreciated! Please feel free to ask for more info if I haven’t provided it!
/r/djangolearning
https://redd.it/1f07rqp
A Dead Simple Work Queue Using SQLite
I wrote an article on using sqlite3 to create an asynchronous task queue. I am hoping to share it in case anyone is interested and also to get some feedback. Please let me know what you think, and thank you! https://blog.tomhuibregtse.com/a-dead-simple-work-queue-using-sqlite
/r/Python
https://redd.it/1f06ft5
Okrolearn a machine learning library which is for powerful analzys and training while being light
I’m excited to share a project I’ve been working on called okrolearn. Which was created to allow for powerful analazys features and neural network training capabilities my own ideas while being as light as possible.
Target audience:
Machine learning enjoyers, mobile machine learning coders, data scientists.
Comparison:
Compared to things like pytorch or tensorflow it has better macOS support, better cpu usage, is way more light weight, is designed for lighter models, has features that these don't have,
What my project does:
* Trainin machine learning models
* Deploy models
* Is light
* Have analazys features such as correlation heatmaps, plotting kmeans, histograms, plotting losses, paramaters, etc.
* Manage layers for models, convolutional, l regularisation, batch, instance, dropout normalisers
* Have gpu support, custom kernels on gpu
* Have experimental features such as suggesting architecture and layers based on temperature and input data
* Have better macOS support
* Have better cpu performance
Why did I create this for simpler models or models that had to be lightweight tensorflow or pytorch didn't do a good job, I also wanted this library to be mainly in python, also converting pytorch tensors back to numpy arrays for me to analyse them was to slow and annoying, there were also ideas that I wanted to implement on
/r/Python
https://redd.it/1f02lho
vectorized CIE distance in basiccolormath 3.0
[ShayHill/basic\colormath: Simple color conversion and perceptual (DeltaE CIE 2000) difference (github.com)](https://github.com/ShayHill/basiccolormath)
# What My Project Does
Everything I wanted to salvage from the [python-colormath](https://github.com/gtaylor/python-colormath/tree/master) library ... with no numpy deps and 14x speed.
* Perceptual (DeltaE CIE 2000) and Euclidean distance between colors
* Conversion between RGB, HSV, HSL, and 8-bit hex colors
* Simple, one-way conversion to Lab
* Some convenience functions for RGB tuples and 8-bit hex color strings
# Target Audience
Meant for production.
# vectorized functions
If you have numpy installed in your env, basic\colormath will provide vectorized versions of most functions.
|Function|Vectorized Function|
|:-|:-|
|float_to_8bit_int|floats_to_uint8|
|get_delta_e|get_deltas_e|
|get_delta_e_hex|get_deltas_e_hex|
|get_delta_e_lab|get_deltas_e_lab|
|get_euclidean|get_euclideans|
|get_euclidean_hex|get_euclideans_hex|
|get_sqeuclidean|get_sqeuclideans|
|get_sqeuclidean_hex|get_sqeuclideans_hex|
|hex_to_rgb|hexs_to_rgb|
|hsl_to_rgb|hsls_to_rgb|
|hsv_to_rgb|hsvs_to_rgb|
|rgb_to_hex|rgbs_to_hex|
|rgb_to_hsl|rgbs_to_hsl|
|rgb_to_hsv|rgbs_to_hsv|
|rgb_to_lab|rgbs_to_lab|
# Comparison
Sadly, python-colormath has been abandoned, long enough now that a numpy function on which it relies has been not only deprecated but removed. If you still need to use python-colormath, patch np.asscalar
:
import numpy as np
import numpy.typing as npt
def patchasscalar(a: npt.NDArraynp.float64) -> float:
"""Alias for np.item(). Patch np.asscalar for colormath.
:param a: numpy array
:return: input array as scalar
"""
/r/Python
https://redd.it/1ezjfx2
Beautiful Pancakes - A simple way to implement file writing and opening on PyQt's QGraphicsScene
Hey all!
# I am a relatively new Python programmer with experience in PyQt blah blah blah...
Anyways, when I was creating QGraphicsScene test files, I wanted to figure out a way to write QGraphicsItems to files, and then read those files to open them. This really doesn't exist for PyQt/PySide, as I have only found ways to do that in C++ Qt.
*So thats why I just finished Beautiful Pancakes today, [here's the repository\](https://github.com/ktechhydle/beautiful_pancakes).*
# What my project does
Implements file reading and writing for QGraphicsScenes with full support for file dialogs. PySide6 and PyQt5 supported.
# Target audience
It's great for basic to complex scenes, but I will try to update it and eventually make it work for advanced and performance heavy scenes.
# Comparison
There are alternatives, but most are written in C++. I have yet to find a PyQt version.
All serialization/deserialization is done in Pickle.
I hope you enjoy.
/r/Python
https://redd.it/1eznfvj
why choose django?
im in north america, why would someone choose django over say springboot/dot net which many established companies use? or node/express whihc many startups use? what does python/django offer than would make anyone pick it over these fraemworks. also Should I learn flask or django or fastapi first?
/r/django
https://redd.it/1ezun01
Saturday Daily Thread: Resource Request and Sharing! Daily Thread
# Weekly Thread: Resource Request and Sharing 📚
Stumbled upon a useful Python resource? Or are you looking for a guide on a specific topic? Welcome to the Resource Request and Sharing thread!
## How it Works:
1. Request: Can't find a resource on a particular topic? Ask here!
2. Share: Found something useful? Share it with the community.
3. Review: Give or get opinions on Python resources you've used.
## Guidelines:
Please include the type of resource (e.g., book, video, article) and the topic.
Always be respectful when reviewing someone else's shared resource.
## Example Shares:
1. Book: "Fluent Python" \- Great for understanding Pythonic idioms.
2. Video: Python Data Structures \- Excellent overview of Python's built-in data structures.
3. Article: Understanding Python Decorators \- A deep dive into decorators.
## Example Requests:
1. Looking for: Video tutorials on web scraping with Python.
2. Need: Book recommendations for Python machine learning.
Share the knowledge, enrich the community. Happy learning! 🌟
/r/Python
https://redd.it/1ezrsav
Celery is making me go insane
To preface this, I am using WSL2 Ubuntu in windows 11 for my development environment. I use visual studio code for my code editor.
I wanted to integrate Celery and Redis in a project I was working on, but I keep encountering this issue. Even if the task had already completed and is successful (based on Flower monitoring), when I try to retrieve the task result or task status in my flask app using AsyncResult and .get() it just loads infinitely and shows the status as PENDING and the result as NULL.
Now, I created a new stripped down flask app just to isolate the issue. And even with just a basic Flask app setup I am still experiencing it. I have been messing around with this for more than 48 hours now and it's driving me crazy.
Here are some code snippets from the stripped down flask app:
**\_\_init\_\_.py**
import os, time
from datetime import timedelta
from flask import Flask
from dotenv import load_dotenv
from .extensions import prepare_extensions, celery_init_app
load_dotenv()
app = Flask(__name__)
/r/flask
https://redd.it/1ez7nov
Do Operating Systems Really Impact Web Development?
I've always used macOS throughout my web development journey, and I'm curious to know if the operating system you use has a significant impact on web development. Apart from personal preference, are there any major differences or benefits in using different operating systems like Windows or Linux for web development tasks?
Thanks!
/r/django
https://redd.it/1ezjhvn
opencv based ttf rendering
Hey if you were ever wondering how you can load custom fonts in opencv, you cant do that natively, but i i developed a project that helps you load custom fonts in opencv python.
What My Project Does
My project allows you to render ttf files inside opencv and place text in images
Target Audience
Anyone who is working with text and computer vision
Comparison
From what ive seen there arent many other projects out there that does this, but some of similar projects i have seen are:
- https://pypi.org/project/a-cv2-putTrueTypeText/ this project get the job done, but have really messy code and doesnt have any documentation.
Repo: https://github.com/ivanrj7j/Font
Documentation: https://github.com/ivanrj7j/Font/wiki
I am looking for feedback thank you!
/r/Python
https://redd.it/1ez8w02
New Django Library: Django Action Triggers
It's been a while since I’ve shared something, but I’m excited to announce the release of a new Python library: Django Action Triggers.
This project is inspired by an older one I built a few years ago (django-email-signals). Django Action Triggers is a library that allows you to trigger actions based on database changes in your Django application.
It supports webhook integration and can send messages to brokers such as Kafka and RabbitMQ. You can easily set up actions to be triggered by specific events, all configurable through the front end.
What My Project Does
It allows you to configure triggers where a trigger is essentially watching out for some kind of database change. This is done using signals (post_save, pre_save, etc).
Alongside these triggers, you can configure some kind of action to take place. For now, this only will allow you to hit a webhook, or send a message to a message broker (RabbitMQ and Kafka supported).
Target Audience
At the moment, this is a toy project to get me comfortable write code that's supposed to be extensible again. However, would be nice if this eventually reaches production.
Comparison
From what I've seen so far, at the moment there isn't anything comparable unless you consider setting everything up
/r/Python
https://redd.it/1eyz2pp
ipydatagrid is now part of Project Jupyter
https://blog.jupyter.org/ipydatagrid-is-now-part-of-project-jupyter-3b3dfb877664
/r/IPython
https://redd.it/1eyv93s