Python Daily – Telegram
Python Daily
2.56K subscribers
1.49K photos
53 videos
2 files
39K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
VCAT: Video Transcriber and Translator





# Have you ever wanted to share videos to your non bilingual friends? 🌎


Fear not because I (Claude) have made a noscript that does exactly that!


## What My Project Does


Type in a video URL along with the target language and the program will:

A) Download the media from the URL (Uses youtube-dlp so most websites are compatible)
B) Transcribe it (srt file output)
C) Translate it (srt file output)
D) Add subnoscripts using ffmpeg

All fully automated of course!

🔍 https://github.com/tikene/video-caption-and-translate - You can see some sample translations on my repo to get an idea of how the output video looks


## Target Audience 👥


If you have any friends who, for example, aren't fluent with English, you may have ran into some frustration when trying to share movies, videos or shows that you like. That's what motivated me to make this noscript, making it so you can easily share your interests and build human connections regardless of the language barrier (It's all about making the world a better place 💁‍♀️)



## Comparison 🔄

The projects I could find relating to this subject either:
- Don't accept URLs
- Don't work with long videos
- Don't add the subnoscripts directly to the video
-

/r/Python
https://redd.it/1h85e6v
ML Trading Bot that uses Ranked Ensemble Learning

I created a ML Trading Bot - trained it for a little over 3 years with 24 years of data and started it live on November 20, 2024. It's been going over a little more than 2 weeks, but it's been doing great so far - not indicative of how it will perform but it's had a great debut if you can say that.

GitHub Repo: https://github.com/yeonholee50/AmpyFin

Bot Website: https://ampyfin-website.onrender.com/

What My Project Does

In essence, the trading bot ranks the strategies and gives them weights based on their overall performance while giving slight bias to recent performance (this is so it is reactive to current market trends and adjusts accordingly). These weights determine how much influence they have on the trading strategy. That's the oversimplified explanation of how the bot works. A more denoscriptive explanation is done on the website as well as README

Target Audience

Reason why I'm posting here is because I'm currently looking for contributors who have some expertise in Python (maybe want to contribute or just interested) on the trading strategies side. The more trading and diverse strategies there are, the better the bot will perform. This project is aimed towards developers interested in contributing or just anyone interested in the

/r/Python
https://redd.it/1h7qtzs
Does Flask Support Async? When Should It Be Used?

I've been learning Flask and came across the concept of async in web frameworks. Does Flask support async functions?

If it does what are some practical scenarios where async would be useful in a Flask application? Are there any specific limitations or things to keep in mind when using it?

Would appreciate any guidance or examples to understand this better

/r/flask
https://redd.it/1h81041
PyCon US 2025 Registration Opens

Howdy Pythonistas :)

PyCon US 2025 registration and Travel Grant applications are officially open!

Early bird tickets are available until the first 500 tickets are sold or until January 6, 2025 (whichever comes first). Register today to get your discounted tickets and help us spread the word!

P.S. You can also Submit a Talk for the next 2 weeks!

- Blog Announcement
- Travel Grants

/r/Python
https://redd.it/1h89mmg
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/1h8fj53
Question about route decorators

Do I have to specify the methods in both route decorators or is it okay to do it in just one of the two of my choice?

@app.route('/', methods='GET', 'POST')
@app.route('/index', methods='GET', 'POST')
@loginrequired
def index():
    return render
template('index.html', noscript='Home')

/r/flask
https://redd.it/1h5snak
Accenture interview experience 2024 | I got selected | I used to python to ace the coding round

I am a computer science student and I have multiple offeres. I have recently attended accenture interview and got selected. I have made a video on my interview experience : https://youtu.be/bq3FrksBpwc?si=3tv\_QZNOhy4yhRLy . I will share my amazon interview experience and other experiences (like Tredence) in the follow videos.

/r/Python
https://redd.it/1h8jkfc
So I'm Working on Making Django a Feasible Option for Modern Fullstack Development

The noscript says it all. I want to use django for modern full-stack development. No awkward integrations between React and Django or {% insert_frontend_framework_here %} integrations. So I've opted to build my expertise in django + htmx + alpinejs.

Professionally, I've worked as a systems administrator and IT support person. Just 4 years. I've never really been a dedicated, qualified, or frankly educated developer (whichever's worse), but recently, I've wanted to really focus on building a career as a developer, and I just don't want to use any frontend frameworks that are opinionated. Might be a fool's task, but I don't think I can convince myself to work hard on it any other way. I want to do Python and Django, and I want to do it professionally. I don't know if I should die on that hill, but I really want to.

Rant aside, I'm actually working towards it. I've made a cookiecutter template for building Django apps. https://github.com/lusayo-nyondo/cookiecutter\_djangoapp if anyone wants to see. I want to use it to develop SaaS apps and my goal is to either get a good job or have one of my projects give me a job. In the absence of a job, my plan

/r/django
https://redd.it/1h8dwjz
I have launched my App to generate Podcasts with AI that I have built with Flask

Honestly, developing this whole project has been quite an odyssey. I started with a bit of a crazy idea after seeing what NoteBookLM was but I felt that it was a bit short with its capabilities, like not being able to use custom voices that only work in English or not being able to accept article or Web URLs to make Podcasts, so I decided to start my project called PodcastAI Studio and it has been quite a journey since I started playing with the LLMs I was going to use or the TTS with the ability to clone voices and deliver a good result, it was quite a journey and I also thought about other people wanting to create or build on this whole system so I decided to create some APIs for developers, also a library that works as an API client and now I'm here making this Reddit post telling all this XD, I hope you like the whole experience and I leave you the links to my App and the API documentation along with some images

https://preview.redd.it/9ksmk6opvc5e1.png?width=1366&format=png&auto=webp&s=854414a7af509d9e034d44c54ea43c1633ef6cea

https://preview.redd.it/2aukj6opvc5e1.png?width=1366&format=png&auto=webp&s=09ce2a36964275c846a4c35b8b396d0f57856a12


App: https://www.podcastai.tech/

API Docs: https://www.podcastai.tech/api/docs

/r/flask
https://redd.it/1h8ksz7
Creating a multiplayer quiz game. Cant figure out how to create a lobby.

I'm trying to make backend for an online multiplayer quiz game. front end will be done according to the finished backend by someone else. premise is simple, users log in. they initiate the game, the game will show them both questions and a timer (calculated at front end), at the end someone will win and game will end. Game logic is simple, user creation and log in process is also simple. but I am having hard time on starting on how the matchmaking/lobby and match start process will work. any insights?

/r/djangolearning
https://redd.it/1h81rf2
Location of npm in my windows 11

I have been installing django-tailwind and when I was done. I somehow could run the

python `manage.py` tailwind install command because of the error below

CommandError:

It looks like node.js and/or npm is not installed or cannot be found.



Visit `https://nodejs.org` to download and install node.js for your system.



If you have npm installed and still getting this error message, set NPM_BIN_PATH variable in `settings.py` to match path of NPM executable in your system.



Example:

NPM_BIN_PATH = "/usr/local/bin/npm"


I am not sure how to solve this because I cannot find an npm.exe file anywhere

/r/djangolearning
https://redd.it/1h8p54m
Flet vs Streamlit PWA and conceptual questions

I'm new to flet, but I'm experienced Flutter developer plus I'm a Generative AI Engineer and worked with streamlit or Gradio. I have some conceptual questions.
Q1. If flet uses Flutter, then why does the flet Flutter plugin require a URL? Why cannot the flet UI "live" all together in Flutter?
Q2. Since there's a URL needed anyway, what's the advantage of using it vs for example having a Streamlit UI displayed in a PWA?
Q3. Let's say I develop a personal assistant in flet. Can the assistant access my location, heart rate, my camera (for multi-modal Gen AI), microphone and speakers (for voice assistant functionalities)?

/r/Python
https://redd.it/1h8nzyy
Async django, who is using it and why?

I am curious to know the use cases for async django, and whether there was a performance improvement in doing it.

/r/django
https://redd.it/1h8rd7v
Anyone Using Temporal?

I recently learned about temporal.io through a tech talk. Does anyone in the Django community use this as an alternative to something like Celery? It sounds too good to be true.

/r/django
https://redd.it/1h8tcp9
Django-Q2 in Azure Web App

I'm trying to migrate an overgrown POC app from an ex-colleague's desktop to the cloud. It's urgent, so I had to just figure out a plan of action quickly and run with it.

The app is a Django application with management dashboard, along with a whole range of tasks that need to be run at specific times throughout the day.

My colleague used to just run the server on his machine and have some Cron jobs configured for the tasks.

I've turned the Cron jobs into Django-Q2 schedules, which seem to run fine locally.

I've made 2 Azure Web Apps, one that starts up the Django application and hosts the dashboard with the "runserver" command in the startup noscript,which runs fine.

The other should be responsible for running the jobs, so it sets up the schedules in the startup noscript and then runs the "qcluster" command.

This last app keeps restarting, with message "Site startup probe failed after X seconds" and the jobs are not being executed (correctly). I assume this is because this app does not host a web server that can be probed by Azure, but I'm not sure.

2 questions:
* How can I quickly work fix / work around this issue so the app

/r/djangolearning
https://redd.it/1h7z3dc
Astral (uv/ruff) will be taking stewardship of python-build-standalone

An interesting blog post explaining how python-build-standalone is used:

> "On 2024-12-17, astral will be taking stewardship of python-build-standalone ..."

- https://astral.sh/blog/python-build-standalone

/r/Python
https://redd.it/1h8qoxl
Python .gitignore

I'm sure a lot of you have done this:

1. Start new project
2. Need that generic Python .gitignore file on GitHub
3. Google "python gitignore" (though you probably typed "gitingore")
4. Click link and click raw
5. Copy all and paste in your local .gitignore

And I'm sure a lot of you probably just use curl and have it memorized or have it in your shell history or something (fzf ftw). But I can't be bothered to learn curl properly, and I got tired of the manual steps, so I just created a function in my .zshrc file:

function pgi {
curl -JL https://raw.githubusercontent.com/github/gitignore/refs/heads/main/Python.gitignore -o .gitignore
}

So now I can just run pgi whenever I start a new project, and boom, precious seconds of my life saved.

That's it, that's all I have, thanks for reading. I'm sure some of you have ever better solutions, but that's mine.

/r/Python
https://redd.it/1h8rc4g
For those that pay under $50 total in infra costs, what is your app doing?

I’ve seen a lot of people post about how they pay less than $50 in total costs so I’ve had a few questions for you.

What is the purpose of your app?
How much traffic does it see?
What kind of functionality does it support?
What are you using for your DB?
How’s the performance?
What’s the server config?

/r/django
https://redd.it/1h8tez7
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 noscript 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/1h95vc3
Dubt about what the user have to see on page source code.

Is it a problem if i see this on my page source code from browser?

<input id="csrftoken" name="csrftoken" type="hidden" value="ImY3N2E3MzMxNzBkMGY0MGNkYzRiYzIyZGZkODg2ZmFiNDA1YjQ1OWMi.Z1S5sg.5OTK7El82tJoEyCSGVGdahZyouc">

/r/flask
https://redd.it/1h92fch
I built PdfDing using Django

Hi,

over the past six months I have built PdfDing using Django. It is a selfhosted PDF manager and viewer offering a seamless user experience on multiple devices. You can it on GitHub. Some of its features include:

Remembers current position - continue where you stopped reading on any device
Share PDFs with an external audience via a link or a QR Code. Shared PDFs can be access controlled
Dark Mode, colored themes and custom theme colors
Inverted color mode for reading PDFs
SSO support via OIDC

PdfDing was my first real web app projects and my first using Django. The start was a bit rough, but afterwars it has been a blaze :). Feature development is fast and a lot of information is available online.

Other than Django the techstack includes:

the frondend is build using Alpine.js, htmx, jQuery and Tailwind CSS
authentication, registration, account management and OIDC is achieved by django-allauth
Mozilla's PDF.js is used for viewing PDF files in the browser

If you like PdfDing I would be really happy over a star. As the project is open source, if anyone is willing to contribute you are welcome!

/r/django
https://redd.it/1h9eitd