Skip to main content
👤
You
First, why is it recommended to use uv?
🐱
HAO
I know why! Because uv is probably the best Python package manager overall so far!
HAO, you are absolutely right! uv is really a SOTA package manager for Python! We definitely need to use it!
👤
You
Still, what about other package managers?
🐱
HAO
MEOW! Other package managers are not SOTA, uv is SOTA! I love SOTA!
Well… Yes, HAO is mostly right, but you probably don’t need to think that radical about the tools we consider SOTA. Again, we are human beings and… Oops! Well, not only human beings… Carbon-based lifeforms, so to say, and we are not perfect. So all our recommendations are based on our own experience of testing different tools and frameworks, so we selected those tools that we think are SOTA. If you think otherwise, you can always contribute to haolib and improve it the way you think real SOTA must be.

The ways to install haolib:

First, you have to understand the concept of optional dependencies in Python. Since haolib is a monolith, it’s might be not the best idea to install it with all the dependencies, including the ones useless for your project. So we have to use optional dependencies. HAO, do you know what optional dependencies are?
🐱
HAO
Optional dependencies are dependencies that are part of the project, but can be installed only if needed. For example, some libraries might utilize different message brokers like Kafka or RabbitMQ, but you most likely will not need them both in your project. So you can install only the one you need.
Absolutely! Now let’s see how we can install haolib using the optional dependencies feature.
shell
uv add git+https://github.com/hao-vc/haolib[fastapi,sqlalchemy,security]
In this example, we are installing haolib with the following dependencies:
  • fastapi (the full FastAPI integration)
  • sqlalchemy (the full SQLAlchemy integration)
  • security (the security pack, including JWT (with PyJWT), password hashing (with bcrypt), symmetric Fernet encryption (with pyca/cryptography), and more)

The full list of optional dependencies:

How to understand that installation was successful?

Well, despite the fact that uv will show an error message if something goes wrong, the next lines should appear in your pyproject.toml file:
pyproject.toml
[tool.uv.sources]
haolib = { git = "https://github.com/hao-vc/haolib" }

Now you can use haolib in your project.

Exercises

The first one is more rigid and provides less freedom, but also less responsibility to the user.
It stands for "State of the Art".