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

this part u say, i have one problem, i am making my repo there i will do edit pyproject.toml ?

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

Python

No, you need it for basicly any python project
Library or not

And your question was if you can use [tool] tags in your pyproject.toml
As Clouded said - yes, its intended to be used that way - which is what the docs explain

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

Python

Alembic is general purpose library.
What to do in your case is up to you as a developer 🤷‍♂

If you read those, then you already know all you need to know.
Good luck with implementing Alembic

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

Python

As always
Reading the documentation with care and understanding is important

https://alembic.sqlalchemy.org/en/latest/tutorial.html#using-pyproject-toml-for-configuration

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

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

Alembic part is described in Alembic docs 🤷‍♂

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

Python

I just finished this docs you send, by this what i understand the pyproject.toml, this docs is for making a library or what??? what it is do against the alembic, alembim part has nothing here.

So actually i found this will need if i will make new library?🥱

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

Python

yaa i read those things already but actually thos3 not explain properly for what case what to do, again i fear to ask you, as u will say 'read source code to understand 😏'
BTW it also say i can remove the alembic.ini file can be removed but will it ok i will remove this, do u prefer to remove the alembic.ini file and only keep the pyprohect.toml and env.py will be sufficient???

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

Python

i understand this, but see the issue there, when i did alembic init pyprojec...
i found the
sqlalchemy.url = driver://user:pass@localhost/dbname thsi line is in my alembic.ini file not in the pyproject.toml file, as this sqlalchemy.url is the config, but in the case of alembic still it not use the pyproject.toml file for config right?
i still need to keep the alembic.ini file and give my database path there, so how this is the good, i think alembic just forcely trying to adopt the pyproject even thsi is not any need to use by any case as the alembic/env.py will have contains the config its fully sluggish ?

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

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

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