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

WTF why so specific? Why would he need to reconfigure these?

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

Python

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

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

Python

I wish you research first about what is
sys.stdout and sys.stderr and wha tis reconfigure of these.

Try to understand these thigns first then you will learn about writing code in ur laptop and then you know how to write and how to get the output there first and then start from there from basic.

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

Python

Hi everyone! I’m new to Python and I want to learn Python programming from the basics. I’m a complete beginner, so please suggest some good resources, PDFs, or courses that can help me learn step by step. Any help would be appreciated. Thank you! 🙌🐍

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

Python

Do you have a PDF of a book where I can learn Python? Can you help me with this?

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

Python

Do not use FastAPI as Flask
Problem solved 🤷‍♂

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

Python

Reusable block of code.
It takes in data (called arguments) and produces a result.

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

Python

There's still time to rethink the approach.

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

Python

Or, you can just write:
style="success"

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

Python

Are both of you guys assuming a specific Python library/framework?

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

Python

start_Button = Button("start search",
callback_data=f"starttrip:{user_id}:{trip_id}",
style="success")

await query.message.edit_text(
message,
reply_markup=Markup([
[start_Button]]))

👍

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

Python

i could answer it for you but you should understand the basics first

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

Python

i dont know properly,
i want fun 1 start, fun 2 start also without waiting for finish of fun1 result, what is this i need to know for this type of code learning

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

Python

i want when first fun which do network call of post/get, when this is running, meantime the 2nd await fun2 should start running, so that my workflow will be faster anyway i want this,

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

Python

But that is living with a decision you already made. I'm wondering if you changed the library from synchronous to asynchronous because of an assumption that you cannot prove or at least did not fully understand.

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

Python

What?

If u bother with that go write C dude, its the original sin of modern programming langs after all

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

Python

if ur cool with video tutorials -> bro code on YT
if ur cool with written manuals -> w3schools.com

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

Python

Why do want to learn Python?

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

Python

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

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

Python

also right flask jinja has used goodly but here in fastapi with
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
but filename here in fastapi give me server problem

Becasue i am trying to coming to fastapi as i lsiten when my website in flask response one user another user is still pending not do any response to him, thats why i am going to ues the faastpi by replacing all old thigns same html, css, js here and want to use jinja and i foudn url_for() like this works good in in fastapi>

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

Python

See In case of flask apps we do,
@app....
...
return render_templaet(filenam.html)

but in case of fastapi, why i has
to write ,
response_class=HTMLResponse in the top of the @app.get("//..)

also sometime they do like,

@app.get("/")
async def home():
return FileResponse("static/index.html")

again also
@app.get("/", response_class=HTMLResponse)
async def index(request: Request):
return templates.TemplateResponse(
request=request,
name="index.html",
context={}
)

The req
so what approach i should to follow if i want mostly to serve html file like jinja and so on from fastapi, what is best fast? because i am confsued why to give the request obj here in the template, as that does not need to know in return of the html .

what part if i read and know which will solve all the confusion of all thise?

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

Python

import asyncio

why sometimes it treated as external library and sometime it works like normal python code without librrary 😕

Because also i used to clone a repo where in the requirements.txt there was this,

asyncio
😅

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

Python

Breaking rule #2 will get you banned even faster.

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

Python

i think most of the python library using the tg bot api, has the name of the fields same as the docs say in the tg api so those looks very similar, i thought

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

Python

Use a button properly with color as style,

            InlineKeyboardButton(
"Download Now",
url=MY_WEBSITE_LINK.url,
style=KeyboardButtonStyle.BLUE,
)

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

Python

https://realpython.com/python-concurrency/

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

Python

if you are not able to answet the question i recommend that you read on concurrency

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

Python

so... in parallel or serial? You are not answering

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

Python

You assume he knows what a tread is 😔

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

Python

No, if you use a library that's inherently asynchronous, then you should write good asynchronous code in at least the whole thread.

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