Onebite.dev

Developer tips & trick, one bite at a time

Developer tips & trick around python


Updating poetry package manager from 1.1 to 1.2 1.3 or above I got a problem when try to update my poetry package manager from 1.1 to 1.2 1.3 or above. Here is how I solve it
Solve poetry problem: configuration is invalid properties group was unexpected Here is how I solve my poetry python configuration problem, where Additional properties are not allowed (group was unexpected) issue
Get uuid from a link string in python Learn how to get UUID from a string link on a python programming language. This could be useful for example when you are working with Notion site then need to grab the id
Solving Error: pg_config executable not found psycopg2 install On my mac machine, I tried to install a new python library with psycopg2 in it, I got pg_config error, here's how I solve this error
How to add multiple types in pydantic To allow pydantic to accept multiple values we can use Union
How to make bcrypt checkpw function work If you're using bcrypt in python, and try to use checkpw but keep failing, probably you save the hashed password in database wrong. Here's how I solve it.
Solve alembic multiple head revisions are present Just like git, When you have multiple branches on your migrations of sqlalchemy's alembic. It will tell you that you have two different versions that need to be solved.
How to convert sqlalchemy object to json in FastAPI Have you struggled on How to convert sqlalchemy object to json in FastAPI? Do you know that fastapi has jsonable_encoder to do exactly this job?
Solve error Alembic Can't locate revision identified by id_number If you're using Alembic as your migration tool for sqlalchemy project on your python program, you might encountered this problem before -Alembic Can't locate revision identified by id_number- here's how to solve it.
How to bulk update in sqlalchemy python? Update multiple columns one by one is daunting. Learn how to do a bulk update on Sqlalchemy in python programing language to update multiple items at once.
How to count most used words in database with python How to count most used words in a sentence or article with python programming language


Colleciton of bitesize articles for developer around python