🐍 Python & Raspberry 🐍
Piccolo is a fast, user friendly ORM and query builder which supports asyncio.
✔️ شاید با شنیدن کلمهی ORM همهمون یاد SQLAlchamy یا Django ORM بیوفتیم، باشه اینا خیلی خوبن ولی لایبرریهای جدیدی که نوشته میشن دارن از تمام language featureهای نایس عه پایتون ۳ خصوصا 3.6 به بعد (Type Hints, F strings and async/await)
با قدرت استفاده میکنن و زیبایی خلق میکنن.
پیکولو، یکی از همین کتابخونههاست.
نویسندهی پیکولو چون از اوایل روزهای کاریش غرق در دنیای async بوده این ORM رو به صورت async first مینویسه :))
ولی میشه ازش به صورت sync هم استفاده کرد.
✔️ از دیگر ویژگیهاش
• A builtin playground, which makes learning a breeze.
• Tab completion support - works great with iPython and VSCode.
• Batteries included - a User model, authentication, migrations, an admin GUI, and more.
• Modern Python - fully type annotated.
• Make your codebase modular and scalable with Piccolo apps (similar to Django apps) 👌
میتونید ازش به عنوان یه کوئری بیلدر استفاده کنید:
# Select:
await Band.select(
Band.name
).where(
Band.popularity > 100
)
یا مثل یه ORM عادی باهاش رفتار کنید:
# To fetch an object from the database, and update it:
b = await Band.objects().get(Band.name == 'Pythonistas')
b.popularity = 10000
await b.save()
✔️ این ORM بهترین عملکرد رو با postgresql داره ولی از sqlite هم پشتیبانی میکنه و همچنین قسمت زیبای ماجرا اینه که از:
Starlette, FastAPI, BlackSheep, Xpresso and Starlite are currently supported.
هم برای ساختن web app های نایس پشتیبانی میکنه :))
🐙 https://github.com/piccolo-orm/piccolo
#m4hdi
#ORM
#library
#async
〰〰〰〰〰〰
©raspberry_python
دنبال کردن هشتگ m4hdi
دنبال کردن هشتگ orm
دنبال کردن هشتگ library
دنبال کردن هشتگ async
با قدرت استفاده میکنن و زیبایی خلق میکنن.
پیکولو، یکی از همین کتابخونههاست.
نویسندهی پیکولو چون از اوایل روزهای کاریش غرق در دنیای async بوده این ORM رو به صورت async first مینویسه :))
ولی میشه ازش به صورت sync هم استفاده کرد.
✔️ از دیگر ویژگیهاش
• A builtin playground, which makes learning a breeze.
• Tab completion support - works great with iPython and VSCode.
• Batteries included - a User model, authentication, migrations, an admin GUI, and more.
• Modern Python - fully type annotated.
• Make your codebase modular and scalable with Piccolo apps (similar to Django apps) 👌
میتونید ازش به عنوان یه کوئری بیلدر استفاده کنید:
# Select:
await Band.select(
Band.name
).where(
Band.popularity > 100
)
یا مثل یه ORM عادی باهاش رفتار کنید:
# To fetch an object from the database, and update it:
b = await Band.objects().get(Band.name == 'Pythonistas')
b.popularity = 10000
await b.save()
✔️ این ORM بهترین عملکرد رو با postgresql داره ولی از sqlite هم پشتیبانی میکنه و همچنین قسمت زیبای ماجرا اینه که از:
Starlette, FastAPI, BlackSheep, Xpresso and Starlite are currently supported.
هم برای ساختن web app های نایس پشتیبانی میکنه :))
🐙 https://github.com/piccolo-orm/piccolo
#m4hdi
#ORM
#library
#async
〰〰〰〰〰〰
©raspberry_python
دنبال کردن هشتگ m4hdi
دنبال کردن هشتگ orm
دنبال کردن هشتگ library
دنبال کردن هشتگ async
GitHub
GitHub - piccolo-orm/piccolo: A fast, user friendly ORM and query builder which supports asyncio.
A fast, user friendly ORM and query builder which supports asyncio. - piccolo-orm/piccolo