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

What are you talking about?

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

Python

Faster with Burp suite

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

Python

How can we test the get incident api if we have client id client secret and end point using python

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

Python

Not understand but seems cool 😂

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

Python

Yeah btw what you doing bro ?

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

Python

U program to earn i am already earning without programming 😂

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

Python

It is not with code
It is called context manager

And test it, try to introduce errors on purpose and figure out how it works

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

Python

i am making a big work in python to handle data of encryption and decryption data and store those

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

Python

Nah not for me , 😭 just learn python how works that is it and claude max

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

Python

you should read python docs instead of using that shit

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

Python

why cant you answer it yourself?

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

Python

actually ai say me this to use Path_obj.write_bytes, but previously the repo i used they also used the path_obj in the with open() block so i got so pain to decide to choose the most best?

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

Python

so see when i use normal file writing in python i did,

if fmt == "txt":
with open(text_file_path, "wb") as f:
f.write(decrypted_data)

But then if i will use directly pahtlib's Path i not need to write the with context manager, i will only write
text_file_path.write_bytes -> is this ok? no memory leak or problem will occurs?

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

Python

As of May 14, 2025, Motor is deprecated in favor of the GA release of the PyMongo Async API in the PyMongo library

i think i should to use,
from pymongo import AsyncMongoClient

or maybe,
Beanie - is an asynchronous Python object-document mapper (ODM) for MongoDB. Data models are based on Pydantic.

But i am Using PTB repo there is i am using pydantic models but not fastapi directly, so there now what will my tool.
As You say not to use asyncio.to_thread(sync_mongo_fun...), so which i will use now ?

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

Python

Prepare to be blown away

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

Python

Hello friends,

How can someone extract the Python code of a paper? Please guide me.

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

Python

u would need to install a package like "requests" that will allow you to make api requests. Claude or chatfpt can help u with the full implementation.

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

Python

i received some data from an external function, but I’m not sure if it’s coming through as a Path object or a str. 🤔

I’ve been using Path(external_obj) since it seems to work for both types, but is this really the best long-term approach? 🚀

Alternatively, I considered checking the type first to avoid wrapping a Path object again, but that feels like it could get messy with all the edge cases. 😩

What’s your advice: should I explicitly check whether the input is a Path or a str, or can I safely rely on Path() to handle it all? 🙏

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

Python

im studying Doragon's commands

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

Python

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

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

Python

GG u got job ? How you earn

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

Python

you should quit programming

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

Python

What you currently doing bro ?

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

Python

you means to piont htis line:

Open the file pointed to in bytes mode, write data to it, and close the file:

that by this i not need to use the with code right?
but i listened that i should to use with block explicitely as somethinge permission error or somehtign exception occurs in this path's operations, so just using .write_bytes will ok now no problem you say must i will not problem ???

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

Python

https://docs.python.org/3/library/pathlib.html#pathlib.Path.write_bytes

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

Python

I am so ai addicted, i didn't understand a single word lol 😂

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

Python

Why can't u just ask any ai

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

Python

No, to_thread should be used as a last resort (and when you know what you are doing)

Use whatever you like, just do not use to_thread() if you have other (better) options.

And learn the diffrences of async code vs using threads vs using proccesses.

You cannot work with those until you understand what those are.

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

Python

You did not even read my answer or tried to understand it...

Btw,
Mongo has async driver
Why are you using PyMongo which is sync in async application??

It is called Motor - look it up

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

Python

i'm finally making the move from pip to uv. it's been on my list for a while. Any warnings before I go forth? 😁

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