r/Python • • Aug 15 '23

Tutorial Python: Just write SQL

Thumbnail joaodlf.com
0 Upvotes

r/Python • • Nov 11 '08

Why the hatred for functional programming?

0 Upvotes

r/Python • • Feb 10 '22

Discussion Wrote a simple python script for some random guy, he thought it was a virus

0 Upvotes

Is this reasonable? i sent it to him as an EXE to make it more convenient and without even downloading and testing it for virsuses he just accused me of sending him a virus?

I'm actually pretty confused as i took the time out of my day to figure out how to turn the script into an EXE just to make it more comfortable for him only to then get accused and blocked.

I even sent him the .py file and he thought os.system("pause") was going to take control of his computer or something i guess lol wtf.

at least i learned how to make python exes.


r/Python • • Feb 25 '17

How to Predict Stock Prices Easily - Intro to Deep Learning

Thumbnail
youtube.com
0 Upvotes

r/Python • • Dec 29 '12

Simple script to download TPB torrent files

Thumbnail
github.com
3 Upvotes

r/Python • • Mar 26 '21

Tutorial How to extract text from image in Python

Thumbnail
hinty.io
25 Upvotes

r/Python • • Jul 21 '24

Resource Iโ€™m thrilled to announce the release of my new Django package

18 Upvotes

๐Ÿš€ Introducing Django Data Seed: Your Solution for Database Test Data! ๐Ÿš€Iโ€™m thrilled to announce the release of my new Django package, Django Data Seed! ๐ŸŽ‰

This tool is designed to make the lives of developers easier by simplifying the process of populating databases with test data. Whether youโ€™re working on a small project or a large-scale application, Django Data Seed helps you quickly generate realistic data for your development and testing needs.

With Django Data Seed, you can efficiently manage and populate your database with just a single command. It's perfect for ensuring that your applications are rigorously tested and ready for production.

I invite you to check out Django Data Seed on PyPI and GitHub:
๐Ÿ”— PyPI: https://pypi.org/project/django-data-seed/
๐Ÿ”— GitHub: https://github.com/rohith-baggam/django-data-seed
๐Ÿ”— Linkedin : https://www.linkedin.com/in/rohith-raj-baggam/

Thank you for your support, and I look forward to seeing how Django Data Seed can help streamline your development process! Keep an eye on the PyPI package for exciting new features in upcoming versions.

u/django u/python u/backenddevelopment u/djangoorms


r/Python • • Mar 15 '12

Python code to exploit Windows RDP - Yes , its out in the wild!

Thumbnail
pastebin.com
21 Upvotes

r/Python • • Feb 03 '19

[meta] Can we have a moratorium on all GUI posts?

9 Upvotes

I tend to be a downvote-and-move-on kind of person with posts that Iโ€™m tired of, but the insane number of GUI posts as of late are getting ridiculous. Especially since they are all asking the same basic thing.

I think the mods should declare a 1 or 2 month moratorium where all generic โ€œwhat GUI should I useโ€ posts be removed.

Thoughts? Am I just being a crotchety old man? Or do others agree this is too much? (Not mutually exclusive)

Thanks

P.S.

What are your thoughts on the best GUI for python?


r/Python • • Dec 01 '25

Showcase Introducing Typhon: statically-typed, compiled Python

0 Upvotes

Typhon: Python You Can Ship

Write Python. Ship Binaries. No Interpreter Required.

Fellow Pythonistas: This is an ambitious experiment in making Python more deployable. We're not trying to replace Python - we're trying to extend what it can do. Your feedback is crucial. What would make this useful for you?


TL;DR

Typhon is a statically-typed, compiled superset of Python that produces standalone native binaries. Built in Rust with LLVM. Currently proof-of-concept stage (lexer/parser/AST complete, working on type inference and code generation). Looking for contributors and feedback!

Repository: https://github.com/typhon-dev/typhon


The Problem

Python is amazing for writing code, but deployment is painful:

  • End users need Python installed

  • Dependency management is a nightmare

  • "Just pip install" loses 90% of potential users

  • Type hints are suggestions, not guarantees

  • PyInstaller bundles are... temperamental

What if Python could compile to native binaries like Go or Rust?


What My Project Does

Typhon is a compiler that turns Python code into standalone native executables. At its core, it:

  1. Takes Python 3.x source code as input

  2. Enforces static type checking at compile-time

  3. Produces standalone binary executables

  4. Requires no Python interpreter on the target machine

Unlike tools like PyInstaller that bundle Python with your code, Typhon actually compiles Python to machine code using LLVM, similar to how Rust or Go works. This means smaller binaries, better performance, and no dependency on having Python installed.

Typhon is Python, reimagined for native compilation:

Target Audience

Typhon is designed specifically for:

  • Python developers who need to distribute applications to end users without requiring Python installation

  • Teams building CLI tools that need to run across different environments without dependency issues

  • Application developers who love Python's syntax but need the distribution model of compiled languages

  • Performance-critical applications where startup time and memory usage matter

  • Embedded systems developers who want Python's expressiveness in resource-constrained environments

  • DevOps engineers seeking to simplify deployment pipelines by eliminating runtime dependencies

Typhon isn't aimed at replacing Python for data science, scripting, or rapid prototyping. It's for when you've built something in Python that you now need to ship as a reliable, standalone application.

Core Features

โœจ No Interpreter Required Compile Python to standalone executables. One binary, no dependencies, runs anywhere.

๐Ÿ”’ Static Type System Type hints are enforced at compile time. No more mypy as an optional afterthought.

๐Ÿ“ Convention Enforcement Best practices become compiler errors:

  • ALL_CAPS for constants (required)

  • _private for internal APIs (enforced)

  • Type annotations everywhere

๐Ÿ Python 3 Compatible Full Python 3 syntax support. Write the Python you know.

โšก Native Performance LLVM backend with modern memory management (reference counting + cycle detection).

๐Ÿ› ๏ธ LSP Support Code completion, go-to-definition, and error highlighting built-in.


Current Status: Proof of Concept

Be honest: this is EARLY. We have:

โœ… Working

  • Lexer & Parser (full Python 3.8+ syntax)

  • Abstract Syntax Tree (AST)

  • LLVM integration (type mapping, IR translation)

  • Memory management (reference counting, cycle detection)

  • Basic LSP (completion, navigation, diagnostics)

  • Type system foundation

๐Ÿ”„ In Progress

  • Type inference engine

  • Symbol table and name resolution

  • Static analysis framework

๐Ÿšซ Not Started (The Hard Parts)

  • Code generation โ† This is the big one

  • Runtime system (exceptions, concurrency)

  • Standard library

  • FFI for C/Python interop

  • Package manager

  • Optimization passes

Translation: We can parse Python and understand its structure, but we can't compile it to working binaries yet. The architecture is solid, the foundation is there, but the heavy lifting remains.


Roadmap

Phase 1: Core Compiler (Current)

  • Complete type inference

  • Basic code generation

  • Minimal runtime

  • Proof-of-concept stdlib

Phase 2: Usability

  • Exception handling

  • I/O and filesystem

  • Better error messages

  • Debugger support

Phase 3: Ecosystem

  • Package management

  • C/Python FFI

  • Comprehensive stdlib

  • Performance optimization

Phase 4: Production

  • Async/await

  • Concurrency primitives

  • Full stdlib compatibility

  • Production tooling

See ROADMAP.md for gory details.


Why This Matters (The Vision)

Rust-based Python tooling has proven the concept:

  • Ruff: 100x faster linting/formatting

  • uv: 10-100x faster package management

  • RustPython: Entire Python interpreter in Rust

Typhon asks: why stop at tooling? Why not compile Python itself?

Use Cases:

  • CLI tools without "install Python first"

  • Desktop apps that are actually distributable

  • Microservices without Docker for a simple script

  • Embedded systems where Python doesn't fit

  • Anywhere type safety and performance matter


Inspiration & Thanks

Standing on the shoulders of giants:

  • Ruff - Showed Python tooling could be 100x faster

  • uv - Proved Python infrastructure could be instant

  • RustPython - Pioneered Python in Rust


Want to Help?

๐Ÿฆ€ Rust Developers

You know systems programming and LLVM? We need you.

  • Code generation (the big challenge)

  • Runtime implementation

  • Memory optimization

  • Standard library in Rust

๐Ÿ Python Developers

You know what Python should do? We need you.

  • Language design feedback

  • Standard library API design

  • Test cases and examples

  • Documentation

๐ŸŽฏ Everyone Else

  • โญ Star the repo

  • ๐Ÿ› Try it and break it (when ready)

  • ๐Ÿ’ฌ Share feedback and use cases

  • ๐Ÿ“ข Spread the word

This is an experiment. It might fail. But if it works, it could change how we deploy Python.


FAQ

Q: Is this a replacement for CPython? A: No. Typhon is for compiled applications. CPython remains king for scripting, data science, and dynamic use cases.

Q: Will existing Python libraries work? A: Eventually, through FFI. Not yet. This is a greenfield implementation.

Q: Why Rust? A: Memory safety, performance, modern tooling, and the success of Ruff/uv/RustPython.

Q: Can I use this in production? A: Not yet. Not even close. This is proof-of-concept.

Q: When will it be ready? A: No promises. Follow the repo for updates.

Q: Can Python really be compiled? A: We're about to find out! (But seriously, yes - with trade-offs.)


Links


Building in public. Join the experiment.


r/Python • • Jan 05 '19

I hate notebooks, change my mind

10 Upvotes

I juste hate them. I never liked using them (I've been forced to for several weeks). It just produces bad code, bad habits and unmaintainnable scripts/code.


r/Python • • Sep 29 '25

Discussion Why Today's Python Developers are Embracing Type Hints

0 Upvotes

Python is incredibly popular in fields where speedy experimentation and iteration are critical, and where developers are coming from a broad range of STEM backgrounds, not necessarily computer science. But as projects grow from experiments to production systems, that same flexibility can become a liability.

Saying "if you wanted a production system you should have used a different language" or "just rewrite it in _" is missing the point - Python's optional typing features allow projects to gradually adopt type annotations & type checking as they mature, improving reliability without requiring an expensive/disruptive rewrite.

Blog post: https://pyrefly.org/blog/why-typed-python/


r/Python • • May 27 '25

Discussion Proposal: A finally-like block for if/elif chains (w/Github Issue)

0 Upvotes

I just opened a feature proposal on the CPython issue tracker and wanted to hear what others think.

Issue link: https://github.com/python/cpython/issues/134807

The idea:

Introduce a block (similar to `finally`) that runs only if one of the `if` or `elif` conditions matched. It would look something like this:

if cond1:
    # do A
elif cond2:
    # do B
finally:
    # do C (only runs if cond1 or cond2 matched)

# do D (Basically always runs, if conditions where met or not)

Currently, you'd need to use a separate flag like `matched = True` to accomplish this:

matched = False

if cond1:
    # do A
    matched = True
elif cond2:
    # do B
    matched = True

if matched:
    # do C (only runs if cond1 or cond2 matched)

# do D (Basically always runs, if conditions where met or not)

I'm not sure if `finally` is the right keyword for this, but it gets the concept across.

Would something like this make sense in Python? Could it work? Curious what others think!


r/Python • • Dec 31 '25

Showcase Built a web-based SQLite explorer with cross-table filtering with SQLAlchemy - feedback welcome!

6 Upvotes

TL;DR: Upload a SQLite database, explore multiple tables simultaneously with real-time cross-table filtering, and share results via URL. Built because I kept running into this problem at work.

Since uploading your database to an unknown party isnโ€™t exactly recommended, a playground mode is included so you can explore the features without risking your data!

Try it out:

What My Project Does

  • ๐Ÿš€ Dynamic exploration - View multiple tables at once with real-time filtering

  • ๐Ÿ”— Shareable state - Your entire dashboard (tables, filters) lives in the URL - just copy/paste to share

  • ๐ŸŽจ Zero setup - Upload your .db file and start exploring immediately

  • ๐Ÿ”„ Cross-table filtering - Apply filters that automatically work across table relationships

Target Audience

People who want to automatically explore their data dynamically according to the filters. This can actually be useful in lots of applications!

Comparison

I am very curious to know other similar projects. I could not find online, but I guess lots of projects involve such a filter query builder in their core!

Please give your feedback!

As this is my first open source project, I'm really interested in hearing feedback, suggestions, or use cases I haven't thought of!

I am also happy to hear about other projects doing kind of the same thing. I could not find any online!

P.S. Heavily helped by AI. Tbh Claude code is amazing when guided well!


r/Python • • Sep 27 '09

From their expression on hearing the word Python, I knew I was not going to crack this interview. Iโ€™m not going to mention Python in any future interview.

Thumbnail sayamindu.randomink.org
6 Upvotes

r/Python • • Aug 27 '09

Any online exam for Python?

6 Upvotes

I want to add Python to my CV, but I don't think any institution in India conducts any python exams. Any credible online exam?


r/Python • • Aug 24 '09

map(' '.join, zip(['Work it', 'Make it', 'Do it', 'Makes us',],['Harder', 'Better', 'Faster', 'Stronger']))

Thumbnail songsincodedb.com
38 Upvotes

r/Python • • Dec 06 '13

Why I hate virtualenv and pip

Thumbnail
pythonrants.wordpress.com
2 Upvotes

r/Python • • Dec 19 '17

My actually brother just looked up from his macbook and said this to me.

Post image
2 Upvotes

r/Python • • May 07 '23

Discussion What is the most used keyword or function in all of programming?

2 Upvotes

This thought has been stuck with me for a while now.


r/Python • • Jul 01 '16

Dev Stickers Give Away

Thumbnail
stickers.onion.io
0 Upvotes

r/Python • • Mar 18 '11

On web2py with tornado, cherrypy, paste, mako templates, the regular python shell, and propaganda (7min video)

Thumbnail
vimeo.com
2 Upvotes

r/Python • • Aug 25 '17

Why is there such a demand for Python programmers?

Thumbnail
medium.com
2 Upvotes

r/Python • • Feb 27 '10

Why is web2py.com often down?

0 Upvotes