An interesting blog post explaining how python-build-standalone is used:
"On 2024-12-17, astral 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..."
I'm sure a lot of you have done this:
Start new project
Need that generic Python .gitignore file on GitHub
Google "python gitignore" (though you probably typed "gitingore")
Click link and click raw
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.
Curated a 40 questions quiz on Python coding. Test your knowledge with this quiz. Would love to know your score and feedback!!
I will keep updatig this quiz to make it more comprehensive.
Try this here.
Web development is one of the best field in software development and also it is one of the best thing to learn as it has the most number of jobs.For learning web development firstly you have to learn three basic programming languages HTML CSS and JavaScript these are the three basic pillars of Web development. Give one week to HTML, give two weeks to CSS and give one month to JavaScript after that give one month to React JS and other libraries like Next JS and Mongo DB. After that you can learn React native that you can make mobile apps. And here you go. This complete course will require at least 3 months.
I hope this will help you.
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)?
The future will be of AI. This field of Machine learning and AI will rise in the future more and more and it will destroy some of the fields like web development and many more. In future the fields of software like web development will go down and sectors like Machine learning and AI will rise. Only those web developer will remain who will use AI software like Chat GPT and do the work of 10 developers.
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 for the next 2 weeks!
Hey folks,
I just published a deep dive into how we handle task resilience at GitGuardian, where our Celery tasks scan GitHub PRs for secrets. Wanted to share some key learnings that might help others dealing with similar challenges.
Key takeaways:
Don’t just blindly retry tasks. Each type of failure (transient, resource limits, race conditions, code bugs ) needs its own handling strategy.
Crucial patterns we implemented:
Ensure tasks are idempotent (may not be straightforward,
Used autoretry_for with specific exceptions + backoff
Implemented acks_late for process interruption protection
Created separate queues for resource-heavy tasks
Watch out for:
Never set task_retry_on_worker_lost=True (can cause infinite retries)
With Redis, ensure tasks complete within visibility_timeout
Different behavior between prefork vs thread/gevent models for OOM handling
For those interested in the technical details:
What resilience patterns have you found effective in your Celery deployments? Any war stories about tasks going wrong in production?
Fear not because I (Claude) have made a script that does exactly that!
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 subtitles using ffmpeg
All fully automated of course!
🔍 - You can see some sample translations on my repo to get an idea of how the output video looks
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 script, 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 💁♀️)
The projects I could find relating to this subject either:
Don't accept URLs
Don't work with long videos
Don't add the subtitles directly to the video
Are outdated
The process is fully automatic so I actually find myself using it often, it only takes 10 seconds to start the translation.
Every language is supported because it uses OpenAI for translation, which means you do need an API key but it only costs around $0.01 for every minute of video. I spent $5 and have been using this script for months.
This is my first time sharing a project, so feedback would be greatly appreciated, if this gets any traction whatsoever I'll continue updating it. Let me know if you have any questions or suggestions
Hey Python testing enthusiasts! I'm excited to share a pytest plugin I've been working on that makes testing different parameter variations much cleaner and more maintainable.
If you've ever found yourself writing lots of parametrized tests for different API inputs, credentials, or configuration combinations, you know it can get messy quickly. This plugin lets you organize these variations as fixture methods in a class, making your tests more structured and easier to maintain.
Here's a quick example:
class UserCredentials(FixtureForms):
@pytest.fixture
def valid_user(self):
return {"username": "john_doe", "password": "secure123"}
@pytest.fixture
def invalid_password(self):
return {"username": "john_doe", "password": "wrong"}
def test_login(user_credentials):
response = login_service.authenticate(**user_credentials.value)
if user_credentials.form == "valid_user":
assert response.status_code == 200
else:
assert response.status_code == 401Key Features:
Auto-generates fixtures from class methods
Integrates with pytest's parametrization
Handles nested dependencies elegantly
Zero configuration needed
anyone want to write and maintain tests for combinations of parameter. it should be stable but hey! its a new project so expect rough edges.
there is no currently plugin in pytest that let you dynamically generate fixtures and test nodes in similar way to how pytest-fixture-forms does. this plugin is also being actively used inside a real product(actually this plugin was written as inside an internal tool testing code and later migrated by me to become a standalone pytest plugin).
Check it out on or install with pip install pytest-fixture-forms.
I'd love to hear your thoughts and feedback!
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:
Bot Website:
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 descriptive 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 project. Currently there is 60 strategies, but the aim is to get much more: at least 100. If you have any questions on how it works or just interested in contributing, please don't hesitate to dm or comment.
Comparison
Most trading bots either use one strategy or multiple combination of strategies. The one's that use ML are too complex to understand or use libraries with jargons that are too coated. I specifically used ranked ensemble learning because it's something I've used in the past (for a facial feature measurement application for a medical company), but also because it's quite simple to understand and effective at the same time.
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 : . I will share my amazon interview experience and other experiences (like Tredence) in the follow videos.
Hello all,
Using Unicorn Platform I made my first directory : a comprehensive list of Python libraries used in AI based programming. You can find the directory here:
I have already fed about 189 libraries into the directory, but the list is still growing.
Tell me what you think, any feedback is much appreciated.
Thank you, Daniel
I wanted to share some insights about an interesting project called that I've been exploring.
The python-build-standalone project produces fully usable Python installations that include most extension modules from the standard library. The key feature here is that it minimizes runtime dependencies.
Portability: The distributions are designed to work on any system for the targeted architecture, making it easier to deploy Python applications in diverse environments.
Customizability: Users can include build artifacts and rich metadata, which allows for downstream repackaging. This means you can create a custom Python distribution tailored to specific needs—great for embedding Python in larger binaries.
Sister Project - PyOxy: For those interested in enhancing their Python interpreter with Rust code, there's a related project called PyOxy that builds on these standalone distributions to create single-file executables.
If you’re interested in trying out python-build-standalone, you can find the documentation . The documentation provides detailed instructions on how to build your own standalone Python distributions and includes examples of how to customize your builds.
This tool is particularly beneficial for:
Developers who need to distribute applications without requiring users to install Python or additional libraries.
Projects that aim for a minimal footprint on user systems.
Scenarios where embedding Python within other applications is necessary.
Happy coding!
P.S :- (I am building Origins AI, If you are facing some hard tech issues or If you want to get a product built, DM me)
Hey everyone,
I’ve been working on a template to get started with a generative AI project !
I’ve created a Generative AI Project Template that’s loaded with tools and features to streamline your AI development. You can check it out .
🛠️ Key Features
Engineering tools:
• ✅ Package management: UV
• ✅ Code quality: Pre-commit hooks with Ruff & Detect-secrets
• ✅ Logging: Colorful logs with Loguru
• ✅ Unit tests: Pytest
• ✅ Dockerized: Dockerfile & docker-compose for your evaluation pipeline
• ✅ Make commands: Simplify your workflow (install, run, test)
AI tools:
• ✅ LLMs: Run locally (Ollama, Ollamazure) or in the cloud (OpenAI, Azure OpenAI)
• ✅ Information extraction & QA from documents
• ✅ Chat interface to test your system
• ✅ Async code for efficient AI workflows
• ✅ AI Evaluation Frameworks: Promptfoo, Ragas, and more
CI/CD & Maintenance tools:
• ✅ Pipelines: GitHub Actions (.github/workflows) & GitLab CI (.gitlab-ci.yml)
• ✅ Local CI/CD pipelines: Run GitHub Actions with act and GitLab CI with gitlab-ci-local
Documentation tools:
• ✅ Documentation website: MkDocs + mkdocs-material
• ✅ GitHub Pages deployment: Easy deployment with mkdocs gh-deploy
Any feedback, issues, or PRs are welcome!
Welcome to Free Talk Friday on ! This is the place to discuss the community (meta discussions), Python news, projects, or anything else Python-related!
Open Mic: Share your thoughts, questions, or anything you'd like related to Python or the community.
Community Pulse: Discuss what you feel is working well or what could be improved in the community.
News & Updates: Keep up-to-date with the latest in Python and share any news you find interesting.
All topics should be related to Python or the community.
Be respectful and follow Reddit's .
New Python Release: What do you think about the new features in Python 3.11?
Community Events: Any Python meetups or webinars coming up?
Learning Resources: Found a great Python tutorial? Share it here!
Job Market: How has Python impacted your career?
Hot Takes: Got a controversial Python opinion? Let's hear it!
Community Ideas: Something you'd like to see us do? tell us.
Let's keep the conversation going. Happy discussing! 🌟
Hey everyone! 👋
# What my project does
This tool allows you to step through Python code for LeetCode problems line-by-line. It highlights the current line being executed and shows the real-time values of variables and sub-expressions. It's designed to help visualize code execution and understand the logic flow more easily.
check it our :
anyone trying to understand code behaviour (specifically Leetcode problems)
# Comparison
Unlike standard IDEs or debuggers, this tool focuses on simplifying the debugging process for LeetCode-style coding challenges. It provides a clear, visual breakdown of what’s happening under the hood, making it easier to spot issues and understand how each line affects the program’s state.
Demo :
This is a Python application that lets you control your Roku device with nothing but hand gestures! Using Mediapipe's Hand Landmark Detector, it tracks your hand, identifies gestures, and sends commands to your Roku via its External Control Protocol.
Check out the
Features:
*Real-time hand tracking: Gestures like "thumbs up" control volume or navigation.
*Cross-device support: Works with any Roku device on the same network.
*Easy setup: Plug in a camera, and you’re ready to go.
The target audience is anyone who's ever lost their TV remote, but probably more likely fellow tinkerers and anyone interested in computer-vision.
As far as I can tell, there is no comparison. I've looked around and haven't found anything that does what this does. I guess the only comparison is a regular remote (but you lost that earlier, remember?)
Check out the code on
Or download the .exe and try it out!
Let me know what you think!
Hello again . I'm sharing an excerpt from the latest issue of Tech Talks Weekly with the newest PyCon AU 2024 talks, ordered by the view count for your convenience. Let me know what you think!
⸱ +600 views ⸱ 28 Nov 2024 ⸱ 00h 29m 00s
⸱ +300 views ⸱ 01 Dec 2024 ⸱ 00h 30m 56s
⸱ +300 views ⸱ 30 Nov 2024 ⸱ 00h 28m 10s
⸱ +300 views ⸱ 29 Nov 2024 ⸱ 01h 40m 15s
⸱ +200 views ⸱ 29 Nov 2024 ⸱ 00h 31m 03s
⸱ +200 views ⸱ 28 Nov 2024 ⸱ 00h 31m 16s
⸱ +200 views ⸱ 30 Nov 2024 ⸱ 00h 29m 38s
⸱ +200 views ⸱ 01 Dec 2024 ⸱ 00h 28m 47s
⸱ +200 views ⸱ 01 Dec 2024 ⸱ 00h 19m 14s
⸱ +100 views ⸱ 29 Nov 2024 ⸱ 00h 26m 06s
See the remaining list here:
While tools like MyPy, Pyright, and Pylance have significantly improved static typing in Python, they don't offer the same level of rigor and performance as fully compiled languages.
Imagine a language that compiles to Python bytecode, providing:
Strong static typing: catching errors early and improving code reliability.
Performance benefits: through compilation and optimizations.
Advanced language features: such as algebraic data types, pattern matching, and better concurrency support.
But what are the trade-offs? Would such a language be compatible with the vast Python ecosystem? Could a compiler achieve the same performance as the CPython interpreter? And would the added complexity outweigh the benefits for many Python developers?
I'm curious to hear your thoughts. Have you ever experimented with statically typed Python dialects or considered the potential benefits and drawbacks of a more rigid type system?
Hi everyone! After our huge release, we're proud to announce Mesa 3.1 less than a month later. It contains some major spatial improvements and groundwork for new control and data collection features.
Ever wondered how bird flocks organize themselves? Or how traffic jams form? Agent-based modeling (ABM) lets you simulate these complex systems by defining simple rules for individual "agents" (birds, cars, people, etc.) and then watching how they interact. Instead of writing equations to describe the whole system, you model each agent's behavior and let patterns emerge naturally through their interactions. It's particularly powerful for studying systems where individual decisions and interactions drive collective behavior.
Mesa is Python's leading framework for agent-based modeling, providing a comprehensive toolkit for creating, analyzing, and visualizing agent-based models. It combines Python's scientific stack (NumPy, pandas, Matplotlib) with specialized tools for handling spatial relationships, agent scheduling, and data collection. Whether you're studying epidemic spread, market dynamics, or ecological systems, Mesa provides the building blocks to create sophisticated simulations while keeping your code clean and maintainable.
This release adds experimental support for Observables and Computed, enabling a more reactive and responsive programming model for agent-based simulations. The new Observable and Computable classes allow developers to declaratively define attributes that automatically emit signals when their values change, and compute derived values that update dynamically. This lays the groundwork for more advanced event handling and data visualization features in future releases (#2291).
The experimental cell space module has been updated with full support for n-dimensional property layers. These allow agents to easily interact with and modify spatial properties of the environment, such as terrain, resources, or environmental conditions. The new implementation provides a more intuitive attribute-based API and ensures tight integration with the cell space architecture (#2512).
Mesa now includes built-in support for logging using the standard Python logging module. This provides developers with a flexible and powerful way to add structured diagnostic and debug output to their simulations, without the need for custom logging solutions. The logging system is integrated throughout the library, including the new SolaraViz visualization system (#2506).
Creating multiple agents with varying initialization parameters is now significantly easier with the new Agent.create_agents class method. This factory function supports both uniform and per-agent parameters, simplifying the code required to set up a simulation with a large number of heterogeneous agents (#2351).
In addition to the major new features, this release includes a number of smaller enhancements and bug fixes that improve the overall developer experience. These include removing deprecated functionality, cleaning up examples, and addressing various edge cases reported by the community. Mesa 3.1 requires Python 3.11 or higher.
We always love to hear what you think:
Join our Matrix chat:
Checkout our Discussions:
While tools like MyPy, Pyright, and Pylance have significantly improved static typing in Python, they don't offer the same level of rigor and performance as fully compiled languages.
Imagine a language that compiles to Python bytecode, providing:
Strong static typing: catching errors early and improving code reliability.
Performance benefits: through compilation and optimizations.
Advanced language features: such as algebraic data types, pattern matching, and better concurrency support.
But what are the trade-offs? Would such a language be compatible with the vast Python ecosystem? Could a compiler achieve the same performance as the CPython interpreter? And would the added complexity outweigh the benefits for many Python developers?
I'm curious to hear your thoughts. Have you ever experimented with statically typed Python dialects or considered the potential benefits and drawbacks of a more rigid type system?
Get ProgressPal here is full documentation available in the Github repo:
What My Project Does The code progress tracker called ProgressPal provides an easy to use environment for tracking python functions, iterables and logs. It tries to keep the known tqdm syntax while expanding the usability for simulataneous python runtimes such as Threads and parallel processes. ProgressPal provides an easy to access online environment which collects all progress in one place, visible from anywhere in the world. The main features included are:
Progress Tracking: Track the progress of Python iterables, functions, and log messages in real-time.
Decentralized Monitoring: Monitor multiple Python scripts from any device with an internet connection.
Collaborative Projects: Collaborate and monitor the real-time progress of various scripts running on different devices and processes.
Distributed Systems: Track progress across distributed systems for seamless monitoring and remote collaboration.
Function Tracking: Track the call-count, execution time distribution, execution history, time between calls, error count, function file origin, and function name.
Iterable Tracking: Track the progress of iterables and generators with a progress bar. Additionally, track the total number of iterations, current iteration, and percentage completion, time remaining, iteration execution time, and iteration rate.
Log Server: Start a log server to receive progress updates from Python scripts. The log server can be accessed from any device with an internet connection.
Threading support: Track the progress of multiple threads and processes simultaneously.
Search Functionality: Search for specific functions and iterables in the log server.
Target Audience ProgressPal is made for people who are working with multiple python processes or want to remotely monitor their code. ProgressPal has collaboration in mind providing a 2 click monitoring server for everyone to use. Because of the 1 ms overhead (9ns of tqdm) of the code we recommend this for tracking longer execution times of loops and functions to minimize impact.
Comparison During my work I grew increasingly annoyed with having to jump from terminal to terminal using tqdm. I had a use for a central logging environment. Scouring through my options I couldn't find a suitable option. So after 2 years of being annoyed I decided to make my own.
Comments This project was my first experience with web developement (code quality does reflect this) Because this is my first webdev project security is not the first priority. Therefore this project is mainly developed for personal use and recommended not to run on critical systems. However, it is a great tool to use during developement which I myself have used this in projects with multiple dozens of simultaneous processes without problems.