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

yaa it could be a good things, now after i will move client outside the fun, my cpu usage will low it will not recreatet the client all time right?

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

Python

yo, why you creating pymongo client everytime

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

Python

Please provide a full explanation including all the details that you consider relevant. Your statement is too broad and there is no clear way to answer you, you have to explain:

- what you're doing
- what you're expecting
- what you're using
- where you're running the script
- what Python version you're using
- what packages and their versions you're using
- and the most important thing: show the code YOU wrote (read rule 5️⃣ for that)

and more details, that way your chances to get help will increase.

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

Python

While downloading is I/O bound and belongs to a thread or async, pillow and/or ffmpeg are CPU-bound, and these below in their own proccess, not a thread

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

Python

thanks but wasn't convincing enough.

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

Python

I use it, I never used uv actually

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

Python

Python for data engineering

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

Python

Hello everyone. I'm new here ready to learn and build using python. How would you recommend me to start

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

Python

don't ask twice, be patient.

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

Python

Hi everyone! 👋

I have a question: Which field has better earning potential, Python and AI or cybersecurity? Which one would you recommend for a beginner, and which field has better job opportunities and higher salaries?

Thanks in advance! 😊

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

Python

built-in tool used to display text, numbers, or other data to the screen or standard output.

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

Python

👋 I’ve got a question about my current FastAPI setup. Right now, I’m serving pages from templates/index.html, static/js/app.js, and style.css. 🛠️

I’m planning to host a similar project (my html,css,js part) on GitHub Pages, where the form submissions or click events would send data to my VPS IP address. That VPS would then fetch the main content from my backend. Does this approach sound okay to use? 🤔

Also, if my backend (using Flask) needs to send audio, video, or files, would that work fine? 📼🎥📁

Are You saying to do like this? 🙏✨

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

Python

CS50's Introduction to Programming with Python | Harvard University https://share.google/QqAXROtd6WRfApXsj

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

Python

I am a mechatronics student, and I would like free online resources to learn Python, please.

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

Python

Pip install Telethon

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

Python

No, move MongoClient out of get_collection

You need exactly one client per process believe me, for your tasks is enough

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

Python

def get_collection():
myclient = pymongo.MongoClient("mongodb://localhost:27017/")
mycol = myclient["mydatabase"]["customers"]
mydoc = mycol.find().sort("name")
return mydoc
mycol = get_collection()
See if i keep this logic of search a user and keep this in a function and use with my PTB library ot fastapi to get data of a telegram user so at that moment i call this connection to fetch the data and it take 500ms so for this 500 ms my Python tg bot will not respond to anyone so this time i will call this on asyncio.to_thread(get_collection())
so what should i do? is to_thread is ok here?

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

Python

Who can help me with my Python project?

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

Python

My one function do fetch a image's url form internet and saves in the ssd and do some editing using the pillow.

See When i will do code in fastapi's web dev should i try to write in async way, but here pillow is not allow to write async code, so what will the way, will i make simple def sync_fun() and time of call this function will i call it via asyncio.to_thread(sync_fun) will it fully ok to use like this in fastapi web app?

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

Python

i also thoughtlike this, then one day someone forcefully teach me uv and how to use it to install new library, change python verison and so on, then i never look back at pip 😅

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

Python

Should pip now be completely deprecated in new projects?

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

Python

https://pythonbooks.org/free-books/

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

Python

Okay, but nobody is replying to me. 😅

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

Python

Hi everyone! 👋

I have a question: Which field has better earning potential, Python and AI or cybersecurity? Which one would you recommend for a beginner, and which field has better job opportunities and higher salaries?

Thanks in advance! 😊

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

Python

Form submissions, click events
Sending to your VPS, then backend fetches from VPS??
So where is backend then??

Frontend is visible to everyone - you really want to expose your VPS directly online? With no protection whatsoever...
Sure be my guest...

As for audio, video, whatever
It is just data, for your computer it is just bytes...
Does not matter what you send over the wire - it is just bytes for a computer

And this is offtopic

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

Python

What is print in Python?

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

Python

So i Did research a lot about your this speech, and i found you are saying as normally we use flask which returns the full html page .

Here You Means to say i will use fastapi to send just json or short html elements so that my CPU,ram usage will low and you say i will have a separate service which will send req to my backend and flask will respond back with some data and frontend's js will fetch this and make the webpage dynamically change.
Is this what you means to say me not use full HTML

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

Python

https://pythonbooks.org/free-books/

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

Python

from virus import Virus

virus = virus.Virus()

virus.start()

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

Python

Print("I'm Hacker")

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