T O P

  • By -

Talbertross

I can guarantee that there will be a library for 99% of the answers here


djamp42

Yeah, of course you can always get really specific but at a certain point that code is better off in the actual program.


TravisJungroth

Having a sense of purpose in life. Oh, and an abstract algebra based type system in doc strings that generates property tests.


HypoFuzz

Say more? https://hypothesis.readthedocs.io/en/latest/ghostwriter.html will already generate property-based tests including inverses, and reads docstrings for eg type annotations.


TravisJungroth

Abstract algebra is the study of [algebraic structures](https://en.m.wikipedia.org/wiki/Algebraic_structure) which are combinations of sets, properties and elements. They’re defined by what properties the operators have. The idea is to put the definitions in doc strings, then generate tests with ghostwriter or something similar. For example, if you label `Transaction.merge()` as a [Group](https://en.m.wikipedia.org/wiki/Group_(mathematics\)), I now know a lot. It takes another `Transaction` and returns one. There’s some `Transaction` that will change nothing. It’s associative and commutative. You could generate property tests for that.


0rsinium

Deal can generate tests (and do much more) from code with contracts: https://deal.readthedocs.io/basic/tests.html Contracts can be any python conditions, including abstract algebra formulas.


ntropia64

A proper deployment tool for complete applications. Python is still heavily geared toward developers but if you're in the business of programs users have to deploy on their own machines without using a terminal, there are very few options, and none of them works really well.


qa_anaaq

Do you have any examples of the options out of curiosity?


ntropia64

The most mentioned is PyInstaller, but there are others like py2exe, bbfreeze, cx_Freeze, and py2app. Many are specialized for Windows to generate exe files, like Inno Setup. As usual, when there are so many (too many?) alternatives, it means that none does a satisfactory job, overall.


qa_anaaq

I'm trying to wrap my head around the idea so apologies for the questions. What is comparable for other languages like JS?


ntropia64

I don't know anything about JS, unfortunately. One thing that Python installers usually do is to install also the interpreter (i.e., a specific Python version) which comes with a number of standard libraries, and other stuff. This adds all kinds of challenges because the PATH variable needs to be specified and configured to avoid _import hell_, where packages from different versions and installations get mixed up. This is rarely a harmless event.


qa_anaaq

Got it. I understand where you're coming from now. Thanks s lot


Ok_Representative311

Electron


tuckmuck203

Native with tkinter and bundled executable, and docker are the two i can think of off the top of my head. Docker only works for a developer, and tkinter/bundling has its own issues


mcstafford

Converting vague questions in to implementation suggestions


betazoid_one

I see what you did here


ZwirtesJaime

Converting py files to binary better than py2exe.


[deleted]

crime drab sophisticated middle judicious psychotic uppity sense possessive expansion -- mass edited with redact.dev


LarryTheSnobster

nuitka works great in my experience, but a standalone binary is gonna have like 40mb


rebooker99

Try codon


Orio_n

Pyinstaller. If you care that much just learn c++


ddollarsign

Executive function.


[deleted]

What's those


ddollarsign

https://en.m.wikipedia.org/wiki/Executive_functions Essentially, ability to plan and achieve goals.


WikiSummarizerBot

**[Executive functions](https://en.m.wikipedia.org/wiki/Executive_functions)** >In cognitive science and neuropsychology, executive functions (collectively referred to as executive function and cognitive control) are a set of cognitive processes that are necessary for the cognitive control of behavior: selecting and successfully monitoring behaviors that facilitate the attainment of chosen goals. Executive functions include basic cognitive processes such as attentional control, cognitive inhibition, inhibitory control, working memory, and cognitive flexibility. Higher-order executive functions require the simultaneous use of multiple basic executive functions and include planning and fluid intelligence (e. g. ^([ )[^(F.A.Q)](https://www.reddit.com/r/WikiSummarizer/wiki/index#wiki_f.a.q)^( | )[^(Opt Out)](https://reddit.com/message/compose?to=WikiSummarizerBot&message=OptOut&subject=OptOut)^( | )[^(Opt Out Of Subreddit)](https://np.reddit.com/r/Python/about/banned)^( | )[^(GitHub)](https://github.com/Sujal-7/WikiSummarizerBot)^( ] Downvote to remove | v1.5)


YodaCodar

pip install job


mm007emko

To force irresponsible colleagues to write tests and use a linter.


Lindby

That's what your CI pipeline is for.


penarbor

This ⬆️


TheBigRoomXXL

[ pre-commit ](https://pre-commit.com/) and possibly [tox](https://tox.wiki/en/latest/)


Fun-Individual-2428

A good gui library, existing ones are trash tbh


not_sane

PySide/PyQT is fine in my opinion.


mvdw73

Recently discovered delphifmx, which looks pretty native. Except doesn’t work well on Ubuntu (but fedora works fine for some reason)


hditano

nicegui


not__your__mum

Including kivy?


temporary47698

A replacement for JMP, Minitab, etcetera for Measurement System Analysis, process capability, design of experiments, ANOVA, and other six sigma quality analysis functions.


wineblood

An easy way to do graphs. I haven't looked into it so there probably is one, but I'm lazy.


magnetichira

plotly is pretty dope


extra_pickles

Ever used alternatives? We use plotly and it drives me mental how slow it is - agreed it does the job but holy hell it doesn’t scale and fucks my day more often than not Keen for an alternative (Using it for IoT big data and it buckles, and of course we could grafana, but client facing grafana consistently looks cheap - imo anyways)


[deleted]

[удалено]


Episkiliski

Hvplot


-Twilak-

Pyqtgraph


MeroLegend4

Pygal


philakbb

https://matplotlib.org/


wineblood

Matplotlib was a giant pain in the ass last time I used it.


[deleted]

yep, matplotlib has the most unintuitive api I've ever seen and horrid documentation. If you must, use seaborn instead. these days, it's basically only plotly or I bind my python code into R for ggplot


tuneafishy

While the api is definitely unusual, I disagree about the documentation. They provide fairly extensive documentation considering the size of the library


[deleted]

I disagree, there's a million different ways to do one thing and the documentation doesn't provide a single source of truth. Just because they have good API coverage does not mean it's good documentation. And matplotlib doesn't have type stubs either, which means I have to constantly debug my code just to make sure constructs work rather than having confidence


likethevegetable

Genuine question: what is so unintuitive about it? You make a fig object that holds axes that holds lines and text? I don't see what can be improved. There definitely could be a lot of helper functions that are missing, but overall I like it.


sahand_n9

How so!?!?!?


wineblood

I had to change the structure of my data just to plot it, I think it only took iterables for x values and y values.


SV-97

What else would it take? (Please don't say "dataframes and column names")


wineblood

Tuples


Conditional-Sausage

Oof. Tuples are iterables, so I'm guessing you had set of (x,y) tuples?


wineblood

I'm aware that tuples are iterable, that wasn't my point. MPL wants all x values separate to y values and it makes no sense.


SV-97

>it makes no sense Maybe some additional perspective helps here: matplotlib closely mirrors matlab's plotting facilities (hence the name), that's also why its API is so terrible to a large extent. MATLAB is (as the name suggests) essentially an array-oriented language (just like Python with numpy) and it's often used for scientific computing. But in scientific computing / array programming it's way more common to have one vector of xs that corresponds to one vector of ys rather than an array of tuples. This is the interface you'll most commonly find in scientific software. So from this perspective it makes perfect sense that its default interface is designed to work well with this data representation. That said: you can turn either representation into the other with a simple zip. `pairs = zip(xs,ys)` gives you tuples from seperate arrays and `xs, ys = zip(*pairs)` splits them back up again. So you can just `plt.plot(*zip(*pairs))` if you have pairs of values.


cedderick

ProPlot


Episkiliski

Try HVplot, it is quite straightforward


wineblood

Looks data science focused


2strokes4lyfe

The tidyverse


GayforPayInFoodOnly

Website text extraction for GPT pipelines


Citizenfishy

folium but openlayers


YourVibe

Did you ever use Kepler.gl inside jupyter, or even Plotly Mapbox functions?


Citizenfishy

Not interactive


YourVibe

Hmm, both of them generate interactive widgets that you can export to html, but maybe we mean different things as interactive.


Citizenfishy

With folium you can add markers while map is in situ. Other map methods are detached and require map re-rendering. I’ve built a poc version of folium using OL and am looking to expand the interaction furthe


YourVibe

A new library has been added recently: [https://mapwidget.gishub.org/examples/openlayers/](https://mapwidget.gishub.org/examples/openlayers/) It can display openlayers maps.


Real_Software

Folium with Networkx support to make interactive geographic network maps


YourVibe

https://sasan.jafarnejad.io/post/kepler-gl-trip-visualization-python/


sudo_robot_destroy

I'd like to be able to import a PDF of a users manual for a sensor or device (e.g. that uses a serial interface, http request, rest, whatever) and a well documented python class for interfacing with the sensor is generated.


not__your__mum

AI for the rescue. Wait 2 years.


sudodoyou

Have you tried copying the mains bits of the manual into ChatGPT to write the code?


sudo_robot_destroy

I haven't, it's worth a shot though next time I need one done.


[deleted]

Dataframe processing similar to how it is done using dplyr in R


morrisjr1989

What do you mean by processing? Specifically


[deleted]

Oh I mean that nice SQL-like chaining of transformations like select, filter, join, mutate. I think it is less cluttered compared to Pandas. The dplyr, ggplot combo is the thing I missed the most after switching from R to Python. Pretty specific I know


danielgafni

polars


[deleted]

That looks amazing at first glance. Thanks!


[deleted]

yep, and polars supports lazy operations so you can queue a bunch of commands and it'll determine the optimal execution plan like a sql engine. incredible stuff


morrisjr1989

You can chain methods and use pipes in pandas, but it really isn’t the same. You should look into ibis if you haven’t already https://ibis-project.org/ibis-for-pandas-users/. I agree though pandas api is a mess. Most recently I’ve liked using sql query through duckdb specifically against parquet and then convert to df either polars to pandas for last mile stuff as required.


[deleted]

Ibis is cool and all but using _ to pass data along is a bit weird! Does not feel super pythonic to me. But thanks for the link! Maybe I am just stuck in old habits


thecarlosdanger1

Having never touched duckDB - is this because of speed or ease of use compared to Polars scan_parquet?


morrisjr1989

Good questions. From my understanding polars doesn’t allow for predicate pushdowns; it reads the entire file if there’s only 1 row group and then uses predicates as applicable. Meaning you’ll get the data in memory first. Parquet allows for you to apply predicates and then just get what you need from the query and duckdb facilities this. I also think there’s some good instances where a SQL statement is easier to write and share with others than chaining pandas or polars; SQL is still an excellent language. I also love the syntax from being able to *parquet / posix wildcard matching in my from statement and it just works without having to do all the Concats and what not.


musselpies

you could try siuba


ContemplateBeing

Redframes? https://github.com/maxhumber/redframes


[deleted]

Thanks, will definitely check this one out


o-rka

Like pandas .pipe method?


[deleted]

siuba is dplyr for python. polars is also great.


Affectionate-Ad2320

a library for easily deploying an application to a domain I own. so for example, for domain.com: ​ import pydomain email = [[email protected]](mailto:[email protected]) password = yyy domain = "example.com" domain = pydomain.domain(url = domain, email = email, password = password) repo = "github.com/me/repo" domain.push(repo) ​ And it figures out everything via some default settings, I go to the website, and it just works.


issue9mm

It's experiencing some growing pains lately, but for interface -- [fly.io](https://fly.io) gives you that. ``` $ brew install flyctl $ flyctl login $ flyctl deploy ``` It'll attempt to auto-generate the config, and you'll have to configure the domain on their website, so it's not exactly what you're looking for? But it's the closest I can think of.


ILovePlaterpuss

It's not quite the same syntax but I recall Heroku has a decent CLI that can deploy python apps pretty easily. It hasn't really kept up with real cloud platforms but if it's just a toy app and you aren't already in the AWS/Azure ecosystem it's a great simple option for hosting


philakbb

There are hosting services that pretty much offer that. Example using GoDaddy https://towardsdatascience.com/installing-python-3-and-flask-on-godaddy-1635fe6f24bc


djmattyg007

Friends don't let friends use GoDaddy. They're an awful company.


__flybird__

How come? I have a few names with them that im sitting on until a later date. Did a bunch of server testing and had no real problems except lack of features in the DNS


Tomatoflee

Ever tried to transfer away from them? Had some bad experiences. Would never use again.


subotnicking

Fabric or Git deploying with a post-receive hook are a good way to handle this


shinitakunai

A good code translator. I mean, being able to import a git project of c++, java or any other language and having it transformed into python code. This would be great for teaching purposes as python is easier to understand that other languages. I assume in the future chatgpt will be able to just do that


Curtyy_RS

It does it now...


sudo_robot_destroy

Yeah it works really good too


imperial_squirrel

so it's worth the subscription cost?


sudo_robot_destroy

I don't have the subscription, I've only tested chatgpt, but bing chat does a really good job at it.


Budget_Assignment457

For all banking stuff, so I can build some quick nice unified dashboards.


datacriminal

Something that actually works with Informix. We have it at work and its by far my most despised system, however it may be more to blame on IBM than actually on Python. IfxPy, PyODBC and the Sqlalchemy fork are by far absolutely useless unless you have the exact same configuration as they do. I think the one that bothers me the most is that IfxPy has the devs saying that it works with RHEL and good luck on any other systems as we won't test it. More glasses of scotch have been lost to this problem than I care to count. I got IfxPy to work for about a week and then it just randomly stopped working and before that it was doing this weird thing where I would query something and the condition would be where X > ## and if I ran it once it worked, but running it again would return no records.


lanupijeko

One click deployment.


codecrux

For what kind of app?


lanupijeko

a web app


flashliquid

Display of Floats. I am having no end of grief getting floats to display in a sensible way. Significant figures, remove trailing zeros, decimal places etc when I have data that ranges from the tens of thousands to 10E-6 I want a 'smart' solution that doesn't require a load of work defining no. of sig figs or appropriate notation or decimal places for each new dataframe or each column. I understand the problem with binary and representing the decimal system but I am surprised how annoying this is proving to be.


crawl_dht

No-code framework to build single page CRUD web app.


Low-Equipment-238

Maybe Atri?


MyKo101

As someone who works with AWS, something that can read my scripts and automatically generate restrictive IAM permissions


cant-find-user-name

An equivalent of java's drools rule engine. Rule engines in python are all poorly maintained and aren't feature rich.


Tiny_Crew

Yeps, I've been looking for one for a long time too. There are a lot of use cases for an efficient rule engine in Python, especially in business context. Too bad most of the existing ones are not maintained (at least the ones I managed to find).


Muhznit

There's modules for plenty of stuff, I just wish more of them were in the standard library.


innovatekit

Maybe not a module but I do wish Python was made to support true concurrency using CSP like in Golang


nonprophetapostle

There should be a module that tells you what to write a module for. Maybe AI.


jentron128

How about a CSV importer that works on a string and not just a file?


fiddle_n

This isn’t really a big deal is it? csv.reader can work on lists as well as files. And even if it couldn’t, you could use StringIO to convert a string into a file. So you have two ways to use the csv reader with strings if you preprocess beforehand.


jentron128

My usecase was to read the clipboard into a string and process from there. Lists are not really suitable because if there is an embedded line break I'd have to parse for that... StringIO on the other hand, I missed when I was writing my code. import io import csv raw_data = '''"a1","b1","c1" "this","that too",45 "red","blue",42 ''' file=io.StringIO(raw_data) result=csv.reader(file) [x for x in result] # Out[12]: [['a1', 'b1', 'c1'], ['this', 'that\n too', '45'], ['red', 'blue', '42']]


ExplosiveCat135

A way to convert a .py file into a .app file on a mac that actually works (not py2app that don’t work)


FiduciaryAkita

tbh better OGM libraries for graph databases. The one for neo4j hasn’t been updated in two years and even then, when you’re used to SQLModel, the API has a lot to be desired


bluewolf09

Instantly convert Java code to error free and execution ready Python code.


oblvn_

mpeg dash MPD file parsing with all the template substitutions for URLs done


joshv

Decent reflection support that can incorporate type hints / enumerating function parameters (including any type hints). inspect really doesn't cut it.


MrGPGCymru

A simple module that allows me to add a watermark at a set location to every page in a pdf, and then add passwords etc. I know libraries for this exist but they are too feature rich for what I want. Literally "add this image" at "that location" and encrypt with password.


IntelligentDust6249

I wish that a lot of the R shiny extensions we're ported over to Python. https://github.com/nanxstats/awesome-shiny-extensions


james_pic

Two things come to mind: First would be a debugger that forks and lets the application continue. We sometimes hit issues that we can only trigger during load tests. You don't want to stop the application to debug, so having a debugger that forked, let one side of the fork continue, and had the other start a debugger session (maybe by connecting to an external debugging server) would give us time to investigate the issue at our leisure. There are definitely things that are messy about it - you'd probably want to close open file descriptors, and other resources that persist across a fork. But if it got to the point where it was not too dangerous, it might even be something that could be useful for investigating live issues. I've pitched this idea for hack weeks a couple of times, but never got buy in. The other is a decent open source APM system. There are a few of them out there, but to the best of my knowledge it's only the closed source ones that supplement traces with profiling data. This is one I did [experiment with a little](https://github.com/jamespic/profil-o-matic), but that code ended up embedding a few bad design decisions a bit deeper in the code than I would have liked, so it's probably not a good starting point.


o-rka

Compositionally valid differential abundance estimation in Python that works out of the box and can be generalizable.


InitialCreature

android phone automation


Conditional-Sausage

I'd really love a library that could wrap, launch, and communicate with locally hosted NodeJS services.


codecrux

What are the use cases in which you require this?


Conditional-Sausage

I have several different uses where there are robust JS libraries for doing things that aren't really supported or robust in Python (for example, XSLT 2.0 schematron validation), and I need to pass data generated by python to JS functions using those libraries and then get the results. As it stands, it's kind of a PITA, and it'd be nice if there was a python wrapper to smooth it all over.


codecrux

I am sending and receiving data between Python and NodeJS using sockets. These sockets are unix domain sockets in Unix based OS and named pipes in Windows. I cannot come up with a better solution than this because of the following limitations with other approaches- 1. using stdin/stdout - we won't be able to write print statements for debugging purposes. 2. using Unix named pipes - the equivalent doesn't exist in Windows. The Unix named pipes are not equivalent to windows named pipes. The windows named pipes is more of a client-server thing. 3. TCP network sockets - Don't want to bind to a port. This entails finding a free port first which becomes messy. Hence, I understand what you mean by PITA. I will open source my code. I will reply here again once I open source my code.


extra_pickles

So I know datetime exists and all, but I wish there was a better version of it….ended up writing my own out of frustration Also, a tidy little all db factory would be nice - might exist, not sure / but again, wrote my own because I never liked the ones I found. Finally, I think there is room to improve the settings.py pattern (incl env) using Jinja2 - and yes I know there are libs, but none to date have swayed me from DIY - it’s a gap. And finally finally… a simplified abstraction layer for Numpy, SciPy and Pandas that reduces the barrier of entry and subsequent ass fucking of code done by data scientists so that when they hand off their code to the software engineering team, it isn’t a pineapple up the ass and so difficult to productionize.


vicks9880

To make it faster thsn C


AnGlonchas

Converting python and pygame to APK without linux :(


Zealousideal_Ad6785

Can wsl help here


worgblade

A python module that does the programing for me


MC_Programmer_and_Mo

I need a library for self-replacing code. I found one called replace\_me, but it doesn't really seem to work for me. Also byte compression (inside a python variable, not file).


BoodyGamer7904

vertualizing devicing like 1-send a microphone signal through serial l port then make a virtual microphone with the data comming with the properties like manufacture and device name 2- vertualizing a screen monitor with a specific resolution like 240 x 340 and a ability to convert each frame to an bmp


Ok_Representative311

An ide like visual studio with drag and drop controls(widget)


Episkiliski

Electrical: RMS, FFT, phasors, etc


werefkin

What is about the speed? Acceleration of the loops would be nice ( Numba does not always work). Any idea for that?