A community for talking about the Python programming language.
🌉 bridged from !python@sh.itjust.works by Tidepool
A community for talking about the Python programming language.
🌉 bridged from !python@sh.itjust.works by Tidepool
1 hour in Java
cross-posted from: https://piefed.jeena.net/post/33729
What python project(s) are you currently working on?
With r/python out for the next 48 hours, here’s a post to promote continuing discussion a language we all love. Python.
A library for creating fully typed declarative API clients quickly and easily
cross-posted from: https://programming.dev/post/13395352
Would love to hear any suggestions, feedback or comments.
This is valid Python syntax
cross-posted from: https://programming.dev/post/21515
Some surprising, but valid, python syntax examples.
Python Bindings for llama.cpp
Simple Python bindings for @ggerganov's llama.cpp library. This package provides:
Low-level access to C API via ctypes interface.
High-level Python API for text completion
OpenAI-like API
LangChain compatibility
LlamaIndex compatibility
OpenAI compatible web server
Local Copilot replacement
Function Calling support
Vision API support
Multiple ModelsDocumentation is available at https://llama-cpp-python.readthedocs.io/en/latest.
Is learning programming worth it? Outside of a career, what can I do with programming?
I learned a little bit of python back in college with the hope that it would give me a competitive edge in the field I hoped to enter. Lo and behold, I got a job in a different industry entirely and any knowledge of coding I once had became irrelevant.
Would it be worth it to pick up my python textbook again and self-teach in my free time if I don't want to make a career of coding? What exactly can python be used to create?
Dealing with Databases - Inserting, Updating Etc.
Wondering if anyone here has some advise or a good place to learn about dealing with databases with Python. I know SQL fairly well for pulling data and simple updates, but running into potential performance issues the way I've been doing it. Here are 2 examples.
Is installing personal packages with pipx an anti-pattern?
So I made a small little command-line utility for myself just for practice, but I had a hard time figuring out how to actually turn it into something I can just use on the command line with no fuss. It uses a virtual environment as Python packages should, so it needs to be run in that environment and I was having trouble figuring out how to do it.
But then I remembered that pipx runs application in a virtual environment, and after checking the docs, I found out that it allows installing local packages by just pointing install at the package directory. So I did, and after setting up the command name as a project script that points to main it ended up working.
I haven't ever heard of anyone doing something like this for a personal program though. Is something like this a bad idea? Is it over engineering or error prone? Is there another way that most people do something like this?
Has anyone tried nogil?
I was playing a bit with the nogil version of Python 3.12. In theory it should have large gains for multi threaded workloads (at the expense of single threaded workloads). Has anyone given it a try? https://github.com/colesbury/nogil-3.12
Idle Clicke in Tkinter for Pydroid3 or Desktop
It runs!.. it's just a toy.
win32api alternative for mac and linux that isnt pyautogui, and preferably faster
is there any win32 alternative that is multi platform and doesnt consume too much resources and are fast? thx
Applying DRY to something that isn’t
Had some fun with generators while practicing DRY.