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

That was too easy, thx for the assist

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

Python

In a windows computer, as any other program, you download the installer, open it and follow the assistant

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

Python

Mildred Raines, please verify you are human by clicking the button below. You have 90 seconds.

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

Python

Jokes are better made at @pythonofftopic. It's better not to make jokes here. Be sure to delete this very funny joke.

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

Python

Don’t Assume Floating-Point Numbers Are Perfectly Accurate
https://inventwithpython.com/beyond/chapter8.html

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

Python

why python gives 0.30000000000000004 when adding 0.1 + 0.2

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

Python

You can, but that's bad practice and domain is about your business logic and that's, I think, strange to validate something here

And you need to map models to your ORM (or whatever you use) models probably, and dataclasses is better here

Pydantic here is like using ladle where you can use spoon

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

Python

so i though pydantic's BaseModel will replace the my core python things what do you say will thsi really bad to use Pydantic's models here for store data and pass to another places

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

Python

Anyone blogging websites expert here

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

Python

Python basic project ideas

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

Python

i think a have already saw type as a keyword... what exactly means?

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

Python

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

i was reading this docs, and first i encounter this new things, actually i learn little about type hint when using sqlmodel, pydantic like things, but when i read this docs i found in our code we can use like this,

type Vector = list[float]

Vector = list[float]

from typing import TypeAlias
Vector: TypeAlias = list[float]

i found all this will works fully same is this i undersand correctly, so what do you guys prefer for this what would you say to start doing to a fresh who is starting this???

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

Python

https://wiki.python.org/moin/BeginnersGuide/NonProgrammers

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

Python

One thing at the time
Not all of them at once

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

Python

What are you talking about?
What same network??
We are talking about data validation and rules enforcment.

If you mean Docker, this is not the topic here

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

Python

thanks all of you guys

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

Python

How to install python

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

Python

Use Decimal() from decimal module.

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

Python

I didn't get it

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

Python

https://0.30000000000000004.com/

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

Python

But if you know problems that can cause this decision and if you can bear upon with it - you can use pydantic, that's legal for pragmatic architecture
I've used ORM in domain entities and that's ok if you know what you are doing (https://github.com/MagM1go/marionette/blob/main/src/marionette/domain/entities/character.py)

https://github.com/MagM1go/marionette/blob/main/README_en.md

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

Python

Please ask smart questions.

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

Python

No external dependencies in domain. Dataclass is better here

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

Python

This is not a group to discuss project ideas.

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

Python

See i want to store some data and then retrive those, so what do you say about this,

class OTPPolicy(
BaseModel,
frozen=True,
):
validity_seconds: int = Field(
gt=0,
)

cooldown_seconds: int = Field(
gt=0,
)

max_attempts: int = Field(
gt=0,
)

length: int = Field(
gt=0,
lt=100,
)

Vs Below -> Also i then listen there is:


@dataclass(frozen=True)
class OTPPolicy:
validity_seconds: int
cooldown_seconds: int
max_attempts: int
length: int

what do you say to use what will better, i use BaseModel because it looks fantastic and easy to keep what i need to keep here, and then i listen i should not to use external library in my domain modules, what do you say to use ??? as i think i will use pydantic's BaseModel as normal code which do a lot more easy coding>

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

Python

Use type Vector = list[float] for Python 3.12+ and

Vector: TypeAlias = list[float]

for Python 3.10+ (or 3.9+ ? 🤔). Don't use Vector = list[float] at all.

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

Python

Hello, good morning. I wanted to let you know that the Santander Open Academy is offering a completely free Introduction to Python Programming course. It will be open until December 31, 2026, for anyone who wants to start learning.

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

Python

I need websites to take coaching of python

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

Python

Yes pls sorry forgive me, i will just recreate all my things i got panic to make a proper application with database and external js things all mix, and i think i need to use a lot of things.

Now i am leaving the db topic, as i need to make one database, and only 1 repo should have access this i need to make my app like this right now?

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

Python

yaa yaa you are right, i need to just use same network of my app and my database, so that only my db will be accessible by the app not by any other way, then i am fully ok and not issue ever about my database leak right?

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