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

pyproject.toml's purpose is to be a one-stop shop for configuration of your project. The idea is that tools look up their configuration in the pyprojecd.toml first instead of reading their own configuration file in the root directory. It's not an issue if those tools have their configuration in pyproject.toml but the intended goal.

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

Python

i am asking by this, see i means to say or ask whoever use this before in reality production will it ok or not this is what i am worried from real devs

if anyone who used alembic in his project can give me some advice what to use in reality,

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

Python

👋 Hi everyone! I’m currently trying to integrate Alembic into my Python application so that I’m prepared for database migrations later, even though I don’t think my app needs migrations immediately.

So see as i read the docs and some article about alembic i found they say i need to use install alembic, then

alembic init alembic -> this make a alembic/ folder and a alembic.ini file in the top level directory right?.
Now see what i am confused as the docs also say this use the default 'generic', but i should to use modern, pyproject.toml approach, like
alembic init --template pyproject ./script ->But see i found when i do run this pyproject my own uv's pyproject.toml file got updated with the new data in the same existing file,

cat pyproject.toml ->
[project]
name = "send-email-with-flask"
version = "0.1.0"
description = "Add your description here"
readme = "README.md"
requires-python = ">=3.14.1"
dependencies = [
"alembic==1.19.2",
"sqlmodel>=0.0.39",...
]

[tool.alembic]

# path to migration scripts.
# this is typically a...
# format, relative to ...
# ini file
script_location = "%(here)s/script"
...

I found this last part of the [tool.alembic] got inserted in .toml file, this same toml file is used by uv when i do uv add, or remove package name.
My questions 🤔
What if you who already use this can help me on this, will this break anythign later in production, or should i stick with default generic one ???
Is it completely safe and normal to use Alembic's pyproject.toml configuration in a uv-managed Python project?

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

Python

Password is more about DTO, not domain model

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

Python

So where you need password? Only when you changing/registration/logging in, right?
You just get somehow password hash from your DB and checks if hashed form.password.data is equals to hash from DB

> in UserDOmain i will not keep the value of hashed_password, else i will keep, has_password -> bool
Why you need this? If user exists he probably has a password, otherwise you can generate tokens for every account if you have some non-password registration (like with integrations)

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

Python

Hands-On Machine Learning with Scikit-Learn and PyTorch
Aurélien Géron
Synopsis
The potential of machine learning today is extraordinary, yet many aspiring developers and tech professionals find themselves daunted by its complexity. Whether you're looking to enhance your skill set and apply machine learning to real-world projects or are simply curious about how AI systems function, this book is your jumping-off place.
With an approachable yet deeply informative style, author Aurélien Géron delivers the ultimate introductory guide to machine learning and deep learning. Drawing on the Hugging Face ecosystem, with a focus on clear explanations and real-world examples, the book takes you through cutting-edge tools like Scikit-Learn and PyTorch—from basic regression techniques to advanced neural networks. Whether you're a student, professional, or hobbyist, you'll gain the skills to build intelligent systems. Understand ML basics, including concepts like overfitting and hyperparameter tuning
Complete an end-to-end ML project using scikit-Learn, covering everything from data exploration to model evaluation
Learn techniques for unsupervised learning, such as clustering and anomaly detection
Build advanced architectures like transformers and diffusion models with PyTorch
Harness the power of pretrained models—including LLMs—and learn to fine-tune them
Train autonomous agents using reinforcement learning

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

Python

Yes? Your code - your laws (until it's not on public)

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

Python

And a quick question is can I make my own changes to see how it works?

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

Python

About your weather app

https://openweathermap.org/api/one-call-4?collection=one_call_api

https://github.com/aiogram/aiogram/blob/dev-3.x/examples/echo_bot.py

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

Python

Keep in mind you can do everything with any turing-complete language

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

Python

you can make telegram bot with like only vba script idk

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

Python

Wait I can build telegram bot with only python?!

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

Python

I don't think that's ML theme, but that's trivial, yeah. You can add here, like, telegram bot and tada you have telegram bot with weather command and cool ui because telegram

Documentation is always allowed remember that

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

Python

Nice imma check them if its free

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

Python

Thanks for advice im gonna buy some of them by tomorrow

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

Python

https://packaging.python.org/en/latest/guides/writing-pyproject-toml/

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

Python

Maybe give it to claud

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

Python

Yaa i am getting idea now, thanks btw 💚
i will try to remove this from here 😅

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

Python

yaa i keep hashed_password gere, so that in time of save/store the user information into the database i can easily call
UserModel.model_validate(UserDomain).
but now i need to think twice 😋

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

Python

A correction to this quesion , the flask's -> dict(session) -> has only the values of the fresh_ , id_, csrf_ not any hashed_password in the cookie value, so i was little wrong previously in my question.


{'_fresh': True, '_id': '67a40c46d5ec9a1d5b3d1c6ae5a113185ccc161a3cec3742280f2dd0ac54a9bb61561c2acf73e9bb4410e50a3a5d464497dca2f71bd4eaba25acb06331bda989', '_user_id': 'ab1c8548221a40b4bad1e2f139da187e', 'csrf_token': 'c77cd3275205a29d26ead471b1762f6e98413d2e'}

in UserDOmain i will not keep the value of hashed_password, else i will keep, has_password -> bool !

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

Python

Nvm I a little bit bad at explaining in English

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

Python

I don't really understand what are you talking about, what you do already?

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

Python

I got the api key i just have to replace the token at that special part right?

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

Python

At first I tried to learn html/css then at the js part I left it cuz it was suffering

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

Python

Sorry im a little bit so beginner at these things

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

Python

It made me to buy/find some of those books asap

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

Python

If your fundamentals are clear you can make one 💯

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

Python

Im Just wondering to build a weather checker without YouTube tutorials all by my self

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

Python

You can find some books free in github and that legal I presume

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

Python

I don't know books about machine learning*

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