python | Unsorted

Telegram-канал python - Python

135201

You will be muted until you read the rules. Read them! @Rules_for_Python A group about the Python programming language. Offtopic things go here: @pythonofftopic Resources to learn python: @pythonres Group for Hy: @hylang Selenium: @SeleniumPython

Subscribe to a channel

Python

Hey it's my first do python and I want to get a high Certificate so can anyone help me please I am still only 18 and from SA......

Читать полностью…

Python

ROOT = Path(__file__).parent
SRC = ROOT / "src"
OUT = ROOT / "docs"

if OUT.exists():
shutil.rmtree(OUT)
OUT.mkdir()

Is here any better way to remove this full directory?
rather using shutil any Path way i will use modern 3.12.12 or higher?
I am asking because i listen the Pathlib's Path now going to fully replace the os, shutil so i wish i will got proper way so that later i will not use this os, shutil...

Читать полностью…

Python

Semaphore:
https://docs.python.org/3/library/asyncio-sync.html#semaphore

Читать полностью…

Python

See Friends, when i request to a public endpoint it gives me a file to download, now i want to download the files in parallel so i am using the async.gather there, but suppose i have to download 100 files, but i want only 5 download at once max, so for this what is easiest way to achieve as 5 download req to endpoint will send in a single time.

Читать полностью…

Python

In one of my learning fastapi project i did uv run uvicorn main:app which runs the fastapi server there, what i got a new thigns in the terminal output it shows like this i send below here.
i want to know it shows localhost:random_int what is this why sometime this is same and sometime it is different what is this called is this any important, i rather want to shows timestamp when the req came in log in terminal what do you say will those number 47360,48572... needs when?

INFO: Started server process [9693]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:9999 (Press CTRL+C to quit)
INFO: 127.0.0.1:47360 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:47374 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:48572 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:48572 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:48572 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:60242 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:60250 - "GET /api/health HTTP/1.1" 200 OK
INFO: 127.0.0.1:60242 - "GET /api/health HTTP/1.1" 200 OK

Читать полностью…

Python

Hi guys please I want build an app which measures the morphometric traits of livestock. It should snap the animals in the field and provide the estimated result of the measurement. It can run on Android devices.
How do I do it?

Читать полностью…

Python

i find that JWT, i am currently using fastapi to make normal website with html,css,js here jwt will a good choice ???

Читать полностью…

Python

you can store jwt in cookies though.

Читать полностью…

Python

When using a Flask web app with Flask-Login, a cookie is saved in the browser. If a user attempts to modify the cookie key, Flask detects and blocks the login attempt. What is the best equivalent approach in FastAPI? I have heard that I need to manually implement something with middleware, but I do not understand what is required here. Based on your experience, what do I need to learn to implement a standard email and password login mechanism in FastAPI or any better easy way ?

Читать полностью…

Python

For now use the resources mentioned

Читать полностью…

Python

How should I learn boxing??
Oh, just box with Floyd Mayweather

Читать полностью…

Python

Check out @PythonRes, a channel for Python resources - video courses, pdf books, tutorials and other info to help you learn Python.

Читать полностью…

Python

Check this: https://github.com/oxylabs/OxyMouse/blob/master/examples/with_selenium.py

Читать полностью…

Python

Wow 😭 , ok not exact

Читать полностью…

Python

Explain what do you mean, extract code doesn't make sense

Читать полностью…

Python

As always
Docs has everything you need

https://docs.python.org/3/library/pathlib.html

Читать полностью…

Python

looks like you need an offtopic group, please delete the off-topic message(s) and continue this conversation at @pythonofftopic

Читать полностью…

Python

https://docs.python.org/3/library/asyncio-sync.html#semaphore

Читать полностью…

Python

As for the *random ports*
They are called Ephemeral port
https://en.wikipedia.org/wiki/Ephemeral_port

As for the logging see https://apitally.io/blog/fastapi-logging-guide

Читать полностью…

Python

looks like you need an offtopic group, please delete the off-topic message(s) and continue this conversation at @pythonofftopic

Читать полностью…

Python

Have you read any of the links i sent??

Читать полностью…

Python

Well yeah, you can
You can store whatever in a cookie

But that is not the usual way how APIs work

Of course, it always depends on the use case

Читать полностью…

Python

https://fastapi.tiangolo.com/tutorial/middleware/

https://fastapi.tiangolo.com/tutorial/security/first-steps/

And no, in APIs you do not use cookies
You use JWT (usually)

Читать полностью…

Python

@Elsa242424 how are you doing

Читать полностью…

Python

The given advice wasn't practical
You only gain from that once you're in the intermediate level

Читать полностью…

Python

the best way to learn is handle project with senior programmers

Читать полностью…

Python

Hi friends , can anyone tell me best resource for python backend development
Any resource
Yt , book anything

Читать полностью…

Python

Library, Like on screen cursor movement as like human clicks.

Читать полностью…

Python

No because human actions are not exact

Читать полностью…

Python

Any python library which can mimic exact human mouse actions in selenium etc.

Читать полностью…
Subscribe to a channel