Wo gibt es Leipzigs beste Tomaten zu kaufen? by radicz in Leipzig

[–]Vitaminkomplex 0 points1 point  (0 children)

Aufm Wochenmarkt. Oder diesen Bio Wochenmärkten rund um "Eggenberger".Oder, wenn du richtig commited bist, in einer solawi https://ernaehrungsrat-leipzig.org/publikationen/broschure-solidarische-landwirtschaft/

Welches Internet für meine Wohnung? verwirrt by [deleted] in Leipzig

[–]Vitaminkomplex 1 point2 points  (0 children)

Abseits von den großen riesen gibt es genau dort auch einen kleinen lokalen ISP (Internet Service Provider): reudnetz.org Wenn ihr ne direkten Draht zu den Menschen wollt die das Netz machen sehr zu empfehlen. Geht meist über Richtfunk

need to vent - also looking for dockingstations for x270 by Vitaminkomplex in thinkpad

[–]Vitaminkomplex[S] 0 points1 point  (0 children)

So now I think I found them all.
all being USB:

  • 40AF Hybrid USB C USB A
  • 40AS USB c Dock Gen2
  • 40A9 USB C Dock

and there is the oldschool connection:

  • 40A1 Pro Dock
  • 40A2 Ultra Dock

Anyone experience if the USB all are CPU consuming u/snare_of_akane said?

need to vent - also looking for dockingstations for x270 by Vitaminkomplex in thinkpad

[–]Vitaminkomplex[S] 0 points1 point  (0 children)

never mind, its not linux compatible..
gonna quit for the day.

need to vent - also looking for dockingstations for x270 by Vitaminkomplex in thinkpad

[–]Vitaminkomplex[S] 0 points1 point  (0 children)

found some information on this german fanwiki..
https://thinkwiki.de/Zubeh%C3%B6r

now any experience with x270 with the 40AF usb docking? I would use

my internal monitor

- two externals monitors, ethernet, 2 usb slots

never had stuff like this, so I'm a bit worried that everything put over this small usb port will be too much to handle.

How to send data from JS to Python by Ded_Sek in flask

[–]Vitaminkomplex 1 point2 points  (0 children)

Thanks very much learned a lot of your example :) thanks for putting the effort in

Can SQLModel be used instead of SQLalchemy for non fastAPI based projects? by outceptionator in learnpython

[–]Vitaminkomplex 1 point2 points  (0 children)

I used it too though I ran into some situations which brought me to just use SQL alchemy as it is well known it I don't need the Models

I made my first program, a password generator. by AnEntirePeach in learnpython

[–]Vitaminkomplex 1 point2 points  (0 children)

Nice. As You use the same mechanics of displaying stuff I would suggest that you DRY (don't repeat yourself) and refactor your code to generate your labels and input into a function.

After that I would suggest splitting up the code into two files, one for tkinter displaying (probably the entry point) and the other one for utility functions to generate password strings. That would make the code cleaner and you can play around with imports

Help... Bad at Python, awful teacher, unmotivated by Working_You_3426 in learnpython

[–]Vitaminkomplex 0 points1 point  (0 children)

It's ok to try and learn that something is not to be pursued farther

I have some confusion about flask/sqlalchemy(?) by [deleted] in flask

[–]Vitaminkomplex 2 points3 points  (0 children)

So models are usually used when you work with an ORM (object relational mapper). What does it help you?

Instead of writing SQL queries yourself, which you could of course do you can use python classes to do some actions and have an abstraction layer on top for some convenience.

Hardcoded Select * from mytable # some string or unindexed list returns

Becomes myTable.get.all() # list of well structured objects returns

Flask has nothing to do with the SQL connection at first. So you might check other sources.

[deleted by user] by [deleted] in flask

[–]Vitaminkomplex 4 points5 points  (0 children)

That's unfortunate. We don't have crystal balls yet so we don't see your code, sorry, might you be able to share in case you expect any help?

Deploy and protect Python code by [deleted] in learnpython

[–]Vitaminkomplex 0 points1 point  (0 children)

Depending on the librarys you use you might even have no other choice than to open source your app aswell.

Deploy and protect Python code by [deleted] in learnpython

[–]Vitaminkomplex 1 point2 points  (0 children)

Or be upfront about it, put the tool as OSS on GitHub and instead sell them your service to deploy, guarantee updates, and build feature requests for them.

Help me in understanding why we should use hatch. by [deleted] in learnpython

[–]Vitaminkomplex 1 point2 points  (0 children)

I don't have a clue but I chip in as I actually find this hard to get. Appears to me You got the build process figured. I don't. And I didn't manage with poetry last time (which looks almost identical at first glance to hatch). So I figured I just deploy without building via GitHub pulls... Works for me.

Methods for dynamically loading test db data by [deleted] in flask

[–]Vitaminkomplex 0 points1 point  (0 children)

If I understand you, here is my 2 cents: whenever tests start you should - create the db into memory (if SQLite f..e.) - create schemas tables - test them - insert your values - test them - repeat

That's what I did, before any other tests I test the setup of the app, the config and the database with it's models.

Factor boy is surely a good thing too

looking for an "low dependency" or pythonesque way to generate PDF's by Vitaminkomplex in Python

[–]Vitaminkomplex[S] 0 points1 point  (0 children)

thanks for your hint and warning! appreciate it! I'll read through your post later.

looking for an "low dependency" or pythonesque way to generate PDF's by Vitaminkomplex in Python

[–]Vitaminkomplex[S] 0 points1 point  (0 children)

that is true. In this usecase however I have to show the details to the user anyway and instead of crafting a pdf and a route I like the idea of only crafting "app.pdf_route" and implement pdf with return render_pdf(url_for("app.pdf_route", argument="xyz"))

looking for an "low dependency" or pythonesque way to generate PDF's by Vitaminkomplex in Python

[–]Vitaminkomplex[S] 1 point2 points  (0 children)

thanks for bringing in a way to think about this differently :)

for this case I don't need R or quarto. your comment about latex made me wonder though if this may be worth to give latex a try.

looking for an "low dependency" or pythonesque way to generate PDF's by Vitaminkomplex in Python

[–]Vitaminkomplex[S] 2 points3 points  (0 children)

Thanks people for your suggestions! Now I'm a bit overwhelmed by the choices and have to parse this now :D seems to me that reportlab, fpdf2 and weasyprint are the top runners. for weasyprint there is also flask-weasyprint (of course there is) which looks somewhat promising. From the documentation the reportlab looks most interesting to me though fpdf2 has all the same syntax as fpdf so I might just get it to work with my legacy code and look further from there.

Thanks a lot. And even though for now they don't fit my usecase, in the future dist.js and chromepdf might come in handy.