r/Python 5d ago

Daily Thread Sunday Daily Thread: What's everyone working on this week?

8 Upvotes

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 21h ago

Daily Thread Friday Daily Thread: r/Python Meta and Free-Talk Fridays

4 Upvotes

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:

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 7h ago

Showcase I wrote a Turing complete language / interpreter on top of Python.

53 Upvotes

Target Audience : Python enthusiasts.

What My Project Does:

It's a programming language built on top of Python.

I've got functions, branch statements, variable assignment, loops and print statements (the ultimate debugger) in there.

Running on top of python is pretty wasteful but the implementation gives me a sense of appreciation to what goes into language design, convenience and feature development.

Link: https://github.com/MoMus2000/Boa

Leave a star on the repo if you like it :)

Comparison:

Not recommended to use in Prod. It adds zero value to what exists already in the programming community.


r/Python 16h ago

Showcase Made a self-hosted ebook2audiobook converter, supports voice cloning and 1107+ languages :)

171 Upvotes

What my project does:

Give it any ebook file and it will convert it into an audiobook, it runs locally for free

Target Audience:

It’s meant to be used as an access ability tool or to help out anyone who likes audiobooks

Comparison:

It’s better than existing alternatives because it runs completely locally and free, needs only 4gb of ram, and supports 1107+ languages. :)

Demos audio files are located in the readme :) And has a self-contained docker image if you want it like that

GitHub here if you want to check it out :)))

https://github.com/DrewThomasson/ebook2audiobook


r/Python 16h ago

Showcase Flux: A beautiful flowfield visualization app.

36 Upvotes

What My Project Does

Flux is an interactive Python application that brings flow fields to life, creating mesmerizing particle animations in real time. With configurable flow field functions, color schemes, and particle dynamics, Flux is perfect for both artistic expression and technical exploration.

Key Features

  • Customizable Flow Field: Choose from various mathematical functions to define the behavior of particles in the field.
  • Interactive Particle Control: Modify particle speed, lifespan, radius, and more via an intuitive GUI.
  • Real-Time Rendering: Smoothly renders particle animations with frame-by-frame updates.
  • User-Friendly Interface: Built with a modern and responsive design using dearpygui.

Use Cases

  • Digital Art: Create visually appealing flow animations for presentations or digital installations.
  • Education: Explore mathematical functions/concepts in an engaging, interactive way.
  • Relaxation: Experiment with color themes and motion styles to craft unique relaxing visuals.

Target Audience

  • Visual artists looking to generate dynamic digital art.
  • Developers and Creative Coders experimenting with particle-based animations.
  • Anyone who enjoys exploring the interplay of motion and color.

Check out the project here: https://github.com/harshkaso/flux.

I'd love to get your feedback or feature suggestions!


r/Python 32m ago

Discussion Euchre Simulation and Winning Chances

Upvotes

I tried posting this to r/euchre but it got removed immediately.

I’ve been working on a project that calculates the odds of winning a round of Euchre based on the hand you’re dealt. For example, I used the program to calculate this scenario:

If you in the first seat to the left of the dealer, a hand with the right and left bower, along with the three non-trump 9s wins results in a win 61% of the time. (Based on 1000 simulations)

For the euchre players here:

Would knowing the winning chances for specific hands change how you approach the game? Could this kind of information improve strategy, or would it take away from the fun of figuring it out on the fly? What other scenarios or patterns would you find valuable to analyze? I’m excited about the potential applications of this, but I’d love to hear from any Euchre players. Do you think this kind of data would add to the game, or do you prefer to rely purely on instinct and experience? Here is the github link:

https://github.com/jamesterrell/Euchre_Calculator


r/Python 4h ago

Discussion VSCode non-Pylance Configuration

2 Upvotes

TL; DR: Jedi (base Python extension) + Pylint ("pylint.args:" ["--disable=C,R"], if you don't want Pylint to give convention and refactor related messages) gives a smooth experience using only open source extensions. Don't bother Flake8 cause Pyflakes (Flake8's error checking component) doesn't dig deeper into libraries to verify classes/functions in imports, and only checks overall syntax tree of a file individually. This is unlike how Pylance and Pylint works. Use MyPy for optional Type Checking to have full feature parity with Pylance.

Am currently switching from PyCharm to have more transparency in my IDE and found that Microsoft provides 4 Python "language server" components:-

  1. Pylance: provides language server features as well as linting (including type checking). Only con is that it is closed source.
  2. Pylint: general purpose linting including multi-file support, which means Pylint digs deep into your libraries to check if the imported libraries actually have the proper classes/functions
  3. Flake8: only single file linting support, which means it does not check other files to verify classes/functions and stuff
  4. MyPy: Mostly type checking
  5. Jedi: fallback language server in absence of Pylance. However it provides zero to no error finding features.

So the main two choices for general purpose linting are Pylance and Pylint. Flake8 is faster than Pylint but, but it only checks single files. This is something which is due to the Pyflakes component of Flake8 and is even mentioned in Pyflake's GitHub repo.

But how well does Pylint find errors in the code? Using some custom args (--disable=C,R) within VSCode I was able to make Pylint stop giving convention/refactoring messages and work very well for only finding out actual programming error, and make it work like a drop in for Pylance for finding errors.

Pylint combined with Jedi (fallback language server in absence of Pylance) has so far been able to give quite a smooth experience and almost have feature parity with Pylance. Am only missing out on type checking (pylance or mypy) but that is something am not really concerned about.

Honorable mentions: Black and isort for formatting and import sorting, autopep8 doesn't work well together with isort hence the choice.

I thought I would share my configuration for others who are most likely on VSCodium and also ask others' configurations on this. It's pretty disappointing Microsoft put Pylance behind a closed source extension. Nevertheless at the same time linters like Pylint getting their own language server extensions also means options are available for people who don't wanna use Pylance.


r/Python 1h ago

Resource Join our rapidly growing open source community!

Upvotes

We're building an open source project with SAAS model to create the ultimate scheduling tool in the market for students around the globe!

Unlike most community servers, we actually do stuff here by building projects and actively learning: https://discord.gg/3UfJEVGS


r/Python 4h ago

Resource Machine Learning

1 Upvotes

Hi everyone! I am currently a practicing physician with master in clinical science and research degree. Previous experience includes analysis with R. I have developed a strong interest in machine learning and want to focus on machine learning in medicine. Currently I am doing Andrew Ng course. Given my background, what additional resources (courses/books) would you recommend for advancing in this field?


r/Python 1d ago

Showcase A lightweight Python wrapper for the Strava API that makes authentication painless

124 Upvotes

What My Project Does

Light Strava Client is a minimalist Python wrapper around the Strava API that automates the entire OAuth flow and token management. It provides a clean, typed interface for accessing Strava data while handling all the authentication complexity behind the scenes.
Key features:

  • Automated OAuth flow (just paste the callback URL and you're done)
  • Automatic token refresh handling
  • Type-safe responses using Pydantic
  • Simple to extend with new endpoints
  • No complex dependencies

Target Audience

This is primarily designed for developers who want to quickly prototype or build personal projects with Strava data. While it can be used in production, it's intentionally kept minimal to prioritize hackability and ease of understanding over comprehensive feature coverage.

Comparison

The main alternative is stravalib, which is a mature and feature-complete library. Light Strava Client takes a different approach by offering a minimal, modern (Pydantic, type hints) codebase that prioritizes quick setup and hackability over comprehensive features.

The code is available here: https://github.com/GiovanniGiacometti/Light-Strava-Client

I'd love to hear your thoughts or feature suggestions!


r/Python 1d ago

Showcase A pytest plugin to run async tests 'concurrently'

56 Upvotes

What My Project Does

System/Integration tests sometimes can take really long time, due to spending huge amount of time waiting for external services responding. Pytest-asyncio make async tests testable, but run them sequentially. Pytest-xdist spinup multiple processes, blew up our fragile server during tests collection :(

  • This plugin is to solve this by running asynchronous tests in true parallel, enabling faster execution for high I/O or network-bound test suites.
  • Also give you high flexibility to specify tests that can run in parallel.
  • Compatibility with Pytest-asyncio if you are already deep in rabbit hole.

Target Audience

The plugin is mainly targeted system/Integration tests, which is heavily bounded by I/O, network or other external dependency.

This plugin would more or less Break Test Isolation Principle. So make sure your tests is ok to run concurrently before you use this plugin.

Comparison

As mentioned above, unlike pytest-asyncio, which runs async tests sequentially, pytest-asyncio-concurrent takes advantage of Python's asyncio capabilities to execute tests concurrently by specifying async group.

Try this out!

Welcome to try this out, and let me know your feedback!

Github link: https://github.com/czl9707/pytest-asyncio-concurrent
PyPI: pip install pytest-asyncio-concurrent


r/Python 22h ago

Showcase Spotify Scheduler - Easily schedule your Spotify playlists to play at a specific time!

9 Upvotes

What My Project Does
Spotify Scheduler is an app that lets you schedule Spotify playlists to play at specific time (hours, minutes and seconds) (e.g. 8:00-8:15:30). You can use it to automate your listening experience and customize playback times according to your preferences. You can select different playlist for each time slot.

Target Audience
It's ideal for PA systems, school, or just automating music playback at home.

Comparison
I couldn't find any alternatives, so i did this app. The reasonable alternatives are radio automation softwares, but my app is much easier to use.

Github repository: https://github.com/sandrzejewskipl/spotify-scheduler


r/Python 1d ago

Showcase 🌀 Interstice: The Zero-Player Game Simulator

34 Upvotes

PyPI | Website | GitHub

Hey r/Python!

I’m excited to introduce Interstice, a zero-player game simulator that explores emergent behavior on a 2D grid. This Python package brings to life complex systems where entities evolve according to simple rules perfect for those curious about simulation, artificial intelligence, and game theory.

What My Project Does

Interstice is a zero-player game, meaning there’s no user input once the game begins. The simulation evolves autonomously based on pre-defined rules:

  • Entities: Different "agents" (like Demons and Soldiers) interact on a grid.
  • Interactions: These agents follow unique behaviors that create emergent patterns.
  • Visualization: See the grid evolve in real-time through a webpage.

This game lets you experiment with different rules, initial states, and grids to discover the fascinating results of these interactions.

Target Audience

  • A fan of games like Conway's Game of Life or Langton's Ant,
  • Curious about emergent behavior in autonomous systems,
  • Interested in creating interactive simulations for fun or research

Comparison

  • Interactive: Modify rules and observe changes on the fly.
  • Python-first: Built with Python developers in mind, making it easy to extend.
  • Creative: Design unique simulations that explore autonomous systems.

Check it Out

🏆 Win $1000 in the Interstice Competition!

We’re currently hosting a competition for Interstice users! Submit an interstice, and you could win $1000. Details and submission instructions are available on the Interstice Website


r/Python 1d ago

Discussion Is Odoo nice to work with?

20 Upvotes

I might have a new project at hand and they settled on using Odoo. While I know Python and a couple of web frameworks such as Flask and Django, and I will dive into their documentation, a question still remains: from a developer's side of this framework, is Odoo nice to work with?


r/Python 9h ago

Discussion I am attempting to print text when I click the right mouse button, but nothing is appearing in the c

0 Upvotes
# here is the main game file from 
tkinter import *
import setting
import utl
from  cell import Cell
#start
root=Tk()
#window configuration
root.config(bg='black')
root.geometry(f'{setting.WIDTH}x{setting.HEIGHT}')
root.resizable(False,False)
root.title('mine game')
#adding a frame to the window
top_frame=Frame(
    root,
    bg='black',
    width=setting.WIDTH,
    height=utl.height_pert(25)
)
#frame postion
top_frame.place(x=0,y=0)
#another one
left_frame=Frame(
    root,
    bg='black',
    width=utl.width_pert(25),
    height=utl.height_pert(75)
)
left_frame.place(x=0,y=utl.height_pert(25))
 #creating the main game
center_frame=Frame(root,bg='black',width=utl.width_pert(75),height=utl.height_pert(75))
center_frame.place(x=utl.width_pert(25),y=utl.height_pert(25))
#adding button in center frame
'''
btn1=Button(
    center_frame,
    bg='white',
    text='First Button'
)
btn1.place(x=0,y=0)
'''
#how to creat button layout with grid tk methode
'''
c1=Cell()
c1.creat_btn(center_frame)
c1.btn_obj.grid(
    column=0, row=0
)
'''
for x in range(setting.GRID_SIZE):
    for y in range(setting.GRID_SIZE):
        c=Cell()
        c.creat_btn(center_frame)
        c.btn_obj.grid(column=x,row=y)




root.mainloop()

#cell file 
from tkinter import Button
class Cell:
    def __init__(self, is_mine=False):
      self.is_mine=is_mine
      self.btn_obj=None
      self.left_click_action = None
    def left_click_action(self, event):
        print("left mouse click")
        print(f"{event} is done")

    def creat_btn(self, location):

        btn = Button(
                location,
                text='text'
            )
        btn.bind('<Button-1>', self.left_click_action)

        self.btn_obj = btn

r/Python 1d ago

Showcase YTMASC, take your YouTube music library to anywhere!

8 Upvotes

GitHub

I've been developing this tool for quite a while now, but was hesitant to share it because I had many things in mind to implement. However I'd like to share the project as about half of the stuff is in there and functional.

What My Project Does

YTMASC gets your library by:

  • Scraping your YouTube library page (yes I know this is a horrible way of doing it but it's the easiest, I've something else in mind don't worry but it'll be the least of my priorities :D)
  • Imports RiMusic databases (also ViMusic since the fork didn't change the database schema)
  • A CSV file of your own that has 3 columns (*watch_id, artist, title)

And puts data from these sources into a simple json file. The information here is later used at the tasks you want to run.

Also, there are some tools to help you fix any issues you may run into (YouTube making the video unavailable, migration of old libraries etc.)

It's mainly available as CLI with a config file you can tinker with, I had written a tkinter GUI before but I don't want to maintain it anymore due to it being well, unmaintainable because I didn't think I'd be developing this many features :x. There's also a Windows binary built using PyInstaller that I push whenever there's a good chunk of changes.

Target Audience

Anyone that wants an offline music library that uses YouTube as it's backend.

Comparison

yt-dlp and its wrappers can already embed metadata provided by YouTube, however that metadata is more often than not ends up being garbage. By using this tool you can edit the metadata that's going to be passed in by editing the json library or its CSV export by doing some regex magic :p. Or you can also use a tag editor and use the tool to sync the json. Moreover, they don't provide you with an easy way to download files in bulk.


r/Python 1d ago

News 🎄 YTSage v2.0.0: New Release with Enhanced YouTube Download Features

12 Upvotes

Hey everyone! 🎄 Merry Christmas! I'm excited to announce the release of YTSage 2.0.0, a user-friendly YouTube downloader built with Python. This major update brings several significant improvements and new features to make your downloading experience smoother.

What's New? 🚀

  • Smart Playlist Handling: Added support for playlist downloads with automatic URL detection and optimal quality selection
  • Download Controls: New pause, resume, and cancel buttons for better download management
  • Real-time Progress: Live tracking of download speed, ETA, and percentage completion
  • FFMPEG Integration: Added FFMPEG checker with an easy installation guide
  • Advanced Options: Support for custom yt-dlp commands for power users
  • Better Debugging: Added yt-dlp log viewer for troubleshooting
  • UI Improvements: Enhanced scroll interface and clearer error messages
  • Quality of Life: Save and remember download paths between sessions
  • Auto-Updates: Built-in update checker to keep you on the latest version

Installation Options 💿

bash pip install YTSage

Platform-specific packages:

  • Mac users: .app package available
  • Linux users: AppImage package available

Technical Updates 🔧

  • Updated to the latest version of yt-dlp
  • Fixed title bar display with version number
  • Various UI and performance improvements

Links 🔗

  • Check it out on PyPI: YTSage
  • Check it out on GitHub: YTSage

Feel free to try it out and share your feedback! If you encounter any issues or have suggestions, please open an issue on GitHub.

Happy downloading and Happy Holidays! 🎅


r/Python 1d ago

Showcase A Modular Framework for Custom Rock-Paper-Scissors games

2 Upvotes

I'd like to share the first Python project that I’ve taken from an initial idea all the way through to publishing on GitHub and PyPi. It's a modular framework for creating Rock-Paper-Scissors games and variants.

What My Project Does:

It is both a playable "Rock Scissors Paper" CLI game, and a flexible framework for building custom versions of the classic game. It's designed to:

  • Support additional choices (e.g., Rock, Paper, Scissors, Lizard, Batman).
  • Ensure consistent win-loss relationships based on the number of choices.
  • Be easily extended for more complex variants.

Target Audience:

This project was primarily written for my own learning experience, though it may be useful for hobbyists to use as the basis of more complex Rock Scissor Paper games.

Features:

  • Customizable Rules: Easily modify the choices and define which hands win.
  • Extensible: Add as many options as you want (as long as they meet the rules).
  • Simple Interface: Play a simple terminal-based game against the computer, or replace the UI class with a more complex interface.
  • Unit tests: Game logic supported by pytests.
  • Single Python file: Can easily be split into multiple modules for more complex versions.

First Release:

GitHub: https://github.com/JamzTyson/Rock_Scissors_Paper

PyPi: https://pypi.org/project/rock-scissors-paper-framework/

I'd love to hear your feedback on this project.


r/Python 1d ago

Showcase ChilliMark - Templateless Multiple Choice Marker (for IBDP and IGCSE)

5 Upvotes

Hi,

Started python in November and ended up making this program. - GitHub

What My Project Does

ChilliMark is able to mark some multiple-choice sheets without the use of QR code, landmarks or predefined templates

It was developed against the multiple-choice sheets for the IBDP and IGCSE exams boards. Specifically, it was developed for the science version of the multiple choice sheets.

It was designed to match the workflow of teachers who should have ready access to auto-feed scanners. Note: Due to this is does not do any de-skewing, only rotation and scaling.

I am releasing it opensource with a free exe. $2 for the watermark-less version and a polite request that if a larger institution uses it they pay me for a commercial license.

I hope to develop it to mark other exam board styles to send me sample, both working and non-working so I can develop it further

Target Audience

Teachers who want to do multiple choice marking automatically. Since this allows the use of non-specialised sheets, students practice on practice exams that look like the final version.

Comparison

Existing alternatives such as zipgrade are based on subscriptions and rely on premade or custom templates that match the spec of the program.
Auto-multiple-choice requires teacher to make the worksheet using latex.

ChilliMark attempts to meet its users' needs and their worksheets. It also avoids the subscriptions model

Features

No template

Use your own worksheets. You do not need to use any special template. It only works with square boxes for now because it was developed against the IBDP and Cambridge IGCSE papers. It does technically require one large box on the page that it uses to determine rotation and scale.

Annotations

Generate annotated pages with the student name, test score, Detected responses, and Correct Answer Key.

Output data

Generate a CSV with both each students score and individual question response rates for further processing.

Clear up ambiguous choices

If two boxes are detected with answers the user can choose the correct questions

Usage

  1. Scan your completed exams using 600 DPI.
  2. Load your PDF - Drag and drop is supported
  3. Enter students' names and answer key and hit continue
  4. Select the question area and define one empty box. This needs to be quite tightly around the box for the best results. Since this is the box used to detect and understand the image it is worth find the best one free of any scanning artifacts
  5. Enter corrections
  6. Finished. Review the output for any mistakes. Run again is there are issue. I hope to allow finer corrections in future updates

r/Python 1d ago

Daily Thread Thursday Daily Thread: Python Careers, Courses, and Furthering Education!

18 Upvotes

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 1d ago

Discussion A library for manipulating Regular Expressions?

0 Upvotes

Is there a Python library for manipulating Regular Expressions?

Regular Expressions as in the formal language concept, not Perl-style regexes.

In particular, I'm looking for a library that, given a regular expression (e.g. n(cn)*c?), can tell me the equivalent Discrete Finite Automaton (ideally minimized), or the equivalent right-regular grammar.


r/Python 1d ago

Tutorial 🐍 Modern, Minimalistic and Scalable Python FastAPI Template🚀

20 Upvotes

Hey! 👋 Excited to share my production-ready API template that shows off modern Python practices and tooling! ✨

Key highlights: 🌟

- ⚡️ Async-first with FastAPI and SQLAlchemy

- 🏗️ Clean, maintainable architecture (repository pattern)

- 🛠️ Latest Python tooling (UV package manager)

- 🧪 Automated testing and CI pipeline

- 🚂 One-click deployment to Railway

The template implements a fun superhero API to showcase real-world patterns! 🦸‍♂️

Technical goodies: 🔧

- ✅ Type hints throughout

- 🔄 Pydantic v2 for validation

- 📖 Automatic OpenAPI docs

- ⚠️ Proper error handling

- 🔄 Async database operations

- ⚡️ Automated migrations

GitHub: https://github.com/luchog01/minimalistic-fastapi-template 🌟

The logging setup and database migration patterns were super tricky to figure out 😅 Not 100% sure if I handled them in the best way possible! Would really appreciate any feedback from the Python experts here! 🙏 Always excited to learn from the community!


r/Python 1d ago

News 🎄 "Packt's Christmas eBook Extravaganza: Everything for $9.99!" 🎄

0 Upvotes

Hello everyone,

Packt's Christmas Sale is live and almost all the e-books are on sale. Only for $9.99

We have 2 books on Python:

1️⃣ 𝐇𝐚𝐧𝐝𝐬-𝐎𝐧 𝐆𝐞𝐧𝐞𝐭𝐢𝐜 𝐀𝐥𝐠𝐨𝐫𝐢𝐭𝐡𝐦𝐬 𝐰𝐢𝐭𝐡 𝐏𝐲𝐭𝐡𝐨𝐧 Master optimization algorithms to tackle real-world challenges in AI and data science by Eyal Wirsansky

📚 Grab the eBook: https://packt.link/L107k

2️⃣ 𝐁𝐢𝐨𝐬𝐭𝐚𝐭𝐢𝐬𝐭𝐢𝐜𝐬 𝐰𝐢𝐭𝐡 𝐏𝐲𝐭𝐡𝐨𝐧 Learn practical biostatistics with Python to bridge the gap between biology and technology by Darko Medin

📚 Grab the eBook: https://packt.link/d5Lxs

Grab your e-book today.

If you are interested we can get connected.

Thanks,

Ankur Mulasi (Relationship Lead with Packt Publishing)

https://www.linkedin.com/in/ankurmulasi/


r/Python 1d ago

Discussion I’m adding Python Plugin support to my app! Here's why I decided to do it 🚀

0 Upvotes

Hey everyone!

I wanted to share a project I’ve been working on: Llama Run 🦙, a simple PC assistant app that I’m now expanding with Python Plugin support! Here’s the backstory on why I’m so excited about adding this feature:

When I started building Llama Run, I just wanted it to do some basic tasks on my PC—like changing settings, automating certain tasks, etc. Kind of like a simple personal assistant.

While looking for ways to add automation functionality, I came across a Python library called PyAutoGUI. This library allows you to automate your PC by controlling the mouse, typing, and other actions—all through Python! It opened up a ton of possibilities for automation in my app.

Then, I found a GitHub repo where someone had combined PyAutoGUI with OpenAI’s API to automate their PC. That really inspired me! I realized I could give users the ability to extend Llama Run with custom Python scripts to automate their own workflows.

That’s when I decided to add Python Plugin support to Llama Run.

Once this feature is fully implemented, developers (and anyone really) will be able to write their own plugins in Python, directly interact with the app, and automate pretty much anything on their PC.

If you have any suggestions on what types of plugins or automation you’d like to see, I’d love to hear them!

I have uploaded the App to Microsoft Store, so I don't think this is the right place to share the link but you can search it there.


r/Python 2d ago

Showcase Relative Date DSL similar to Grafanas Date Picker shortcuts

9 Upvotes

What My Project Does:

It allows for defining relative Date-Times using a human friendly syntax which is great for configuration files.

A basic example to get the first saturday of the current month:

/month -1 day /sat + 1 week

Here is another example that gets every 3rd calendar week;

%cw 3

[Update] If needed, a set of datetime designators can be applied, too:

```cpp // here comes a set of datetime designators { // first saturday of the month: /m -1d /sat + 7d,

// sunday of every second calendar week:
@cw 2 + 6d

} ```

It has more features:

Target Audience:

With its focus on intuitive comprehensibility, I hope to offer value for a variety of roles such as

  • Developers
  • Data-Engineers
  • Technical Writers
  • Business Engineers

Comparison:

A different python package, crontab embodies the de-facto standard domain-specific-language to express repeating date-times in a reliable fashion. The Syntax is powerful and well-established. The properties of both exhibit some overlap but are not identical.

License:

MIT License

More Details at the project documentation GitHub pages. Would love to hear your thoughts and suggestions for improvements!


r/Python 3d ago

Showcase Puppy: best friend for your 2025 python projects

21 Upvotes

TLDR: https://github.com/liquidcarbon/puppy helps you install and manage python projects, environments, and notebook kernels.

What My Project Does

- installs python and dependencies, in complete isolation from any existing python on your system
- `pup add myenv pkg1 pkg2` uses uv to handle projects, packages and virtual environments; `pup list` shows what's already installed
- `pup clone` and `pup sync` help build environments from external repos with `pyproject.toml` files
- `import pup; pup.fetch("myenv")`  for reproducible, future-proof scripts and notebooks

Puppy works the same on Windows, Mac, Linux (tested with GitHub actions).

Get started (mix and match installer's query params to suit your needs):

curl -fsSL "https://pup-py-fetch.hf.space?python=3.12&pixi=jupyter&env1=duckdb,pandas" | bash

Target Audience

Loosely defining 2 personas:

  1. Getting Started with Python (or herding folks who are):
    1. puppy is the easiest way to go from 0 to modern python - one-command installer that lets you specify python version, venvs to build, repos to clone - getting everyone from 0 to 1 in an easy and standardized way
    2. if you're confused about virtual environments and notebook kernels, check out pup.fetch that lets you build and activate environments from jupyter or any other interactive shell
  2. Competent - check out Multi-Puppy-Verse and Where Pixi Shines sections:
    1. you have 10 work and hobby projects going at the same time and need a better way to organize them for packaging, deployment, or even to find stuff 6 months later (this was my main motivation)
    2. you need support for conda and non-python stuff - you have many fast-moving external and internal dependencies - check out pup clone and pup sync workflows and dockerized examples

Comparison

Puppy is a transparent wrapper around pixi and uv - the main question might be what does it offer what uv does not? UV (the super fast package manager) has 33K GH stars. Tou get of all uv with puppy (via `pixi run uv`). And more:
- pup as a CLI is much simpler and easier to learn; puppy makes sensible and transparent default decisions that helps you learn what's going on, and are easy to override if needed
- puppy embraces "explicit is better than implicit" from the Zen of python; it logs what it's doing, with absolute paths, so that you always know where you are and how you got here
- pixi as a level of organization, multi-language projects, and special channels
- when working in notebooks, of course you're welcome to use !uv pip install, but after 10 times it's liable to get messy; I'm not aware of another module completely the issues of dealing with kernels like puppy does.

PS I've benefited a great deal from the many people's OSS work, and this is me paying it forward. The ideas laid out in puppy's README and implementation have come together after many years of working in different orgs, where average "how do you rate yourself in python" ranged from zero (Excel 4ever) to highly sophisticated. The matter of "how do we build stuff" is kind of never settled, and this is my take.

Thanks for checking this out! Suggestions and feedback are welcome!


r/Python 3d ago

Tutorial The Inner Workings of Python Dataclasses Explained

156 Upvotes

Ever wondered how those magical dataclass decorators work? Wonder no more! In my latest article, I explain the core concepts behind them and then create a simple version from scratch! Check it out!

https://jacobpadilla.com/articles/python-dataclass-internals

(reposting since I had to fix a small error in the article)