R One Embedding to Rule Them All
Pinterest researchers challenge the limits of traditional two-tower architectures with OmniSearchSage, a unified query embedding trained to retrieve pins, products, and related queries using multi-task learning. Rather than building separate models or relying solely on sparse metadata, the system blends GenAI-generated captions, user-curated board signals, and behavioral engagement to enrich item understanding at scale. Crucially, it integrates directly with existing systems like PinSage, showing that you don’t need to trade engineering pragmatism for model ambition. The result - significant real-world improvements in search, ads, and latency, and a compelling rethink of how large-scale retrieval systems should be built.
Full paper write-up here: https://www.shaped.ai/blog/one-embedding-to-rule-them-all
/r/MachineLearning
https://redd.it/1k5b3ni
Pinterest researchers challenge the limits of traditional two-tower architectures with OmniSearchSage, a unified query embedding trained to retrieve pins, products, and related queries using multi-task learning. Rather than building separate models or relying solely on sparse metadata, the system blends GenAI-generated captions, user-curated board signals, and behavioral engagement to enrich item understanding at scale. Crucially, it integrates directly with existing systems like PinSage, showing that you don’t need to trade engineering pragmatism for model ambition. The result - significant real-world improvements in search, ads, and latency, and a compelling rethink of how large-scale retrieval systems should be built.
Full paper write-up here: https://www.shaped.ai/blog/one-embedding-to-rule-them-all
/r/MachineLearning
https://redd.it/1k5b3ni
www.shaped.ai
One Embedding to Rule Them All | Shaped Blog
Pinterest’s OmniSearchSage represents a major step forward in unified semantic search. By extending the two-tower model into a multi-task, multi-entity framework, it enables a single query embedding to power retrieval across pins, products, and related queries.…
Django - OAuth2 Settings with Google Login >> Experiencing Delusion
Hi everyone, me again 🧉 This time I have some doubts about OAuth2 and Django.
My goal is to set up authentication for my web app ONLY through Google — meaning users should be able to log in or register using their Google accounts.
After some research, I came across the dj-rest-auth package. I’d like to implement it together with djangorestframework-simplejwt, but that's where things start getting a bit dizzy for me.
I'm wondering if any of you have gone through this kind of setup before. If so, any tips, advice, or references would be hugely appreciated!
/r/djangolearning
https://redd.it/1k5etw5
Hi everyone, me again 🧉 This time I have some doubts about OAuth2 and Django.
My goal is to set up authentication for my web app ONLY through Google — meaning users should be able to log in or register using their Google accounts.
After some research, I came across the dj-rest-auth package. I’d like to implement it together with djangorestframework-simplejwt, but that's where things start getting a bit dizzy for me.
I'm wondering if any of you have gone through this kind of setup before. If so, any tips, advice, or references would be hugely appreciated!
/r/djangolearning
https://redd.it/1k5etw5
GitHub
GitHub - iMerica/dj-rest-auth: Authentication for Django Rest Framework
Authentication for Django Rest Framework. Contribute to iMerica/dj-rest-auth development by creating an account on GitHub.
[Resolved]SQLite "unable to open database file" with relative path in Flask project
In my Flask project (running on a Mac virtual environment), I encountered an error when using a relative path for a SQLite database.
I placed `test.db` in a subfolder `temp/` under the project root, like this:
/flask_root/temp/test.db
And in my `__init__.py` file (located under a different subfolder), I configured the database URI like this:
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///temp/test.db'
However, I got the following error:
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/20/e3q8)
After some trial and error, I discovered that using an **absolute path** worked:
import os
base_dir = os.path.abspath(os.path.dirname(__file__))
db_path = os.path.join(os.path.dirname(base_dir), 'temp', 'test.db')
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{db_path}'
**My findings here:**
The issue comes from how **SQLite handles relative paths** differently than Python does:
* **SQLite resolves paths relative to its own execution context**.
* **Python (e.g.,** `os.path.exists(), __init__.py`\*\*) resolves paths based on the interpreter's context\*\*.
If you're using Flask's **application factory pattern**, the app might initialize from a different directory than where you run it. This can make relative paths unreliable unless you ensure all code executes from the exact same working directory—which is tricky to control.
Using absolute paths is a more
/r/flask
https://redd.it/1k4yxv8
In my Flask project (running on a Mac virtual environment), I encountered an error when using a relative path for a SQLite database.
I placed `test.db` in a subfolder `temp/` under the project root, like this:
/flask_root/temp/test.db
And in my `__init__.py` file (located under a different subfolder), I configured the database URI like this:
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///temp/test.db'
However, I got the following error:
sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: https://sqlalche.me/e/20/e3q8)
After some trial and error, I discovered that using an **absolute path** worked:
import os
base_dir = os.path.abspath(os.path.dirname(__file__))
db_path = os.path.join(os.path.dirname(base_dir), 'temp', 'test.db')
app.config['SQLALCHEMY_DATABASE_URI'] = f'sqlite:///{db_path}'
**My findings here:**
The issue comes from how **SQLite handles relative paths** differently than Python does:
* **SQLite resolves paths relative to its own execution context**.
* **Python (e.g.,** `os.path.exists(), __init__.py`\*\*) resolves paths based on the interpreter's context\*\*.
If you're using Flask's **application factory pattern**, the app might initialize from a different directory than where you run it. This can make relative paths unreliable unless you ensure all code executes from the exact same working directory—which is tricky to control.
Using absolute paths is a more
/r/flask
https://redd.it/1k4yxv8
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
faceit-python: Strongly Typed Python Client for the FACEIT API
What My Project Does
faceit-python is a high-level, fully type-safe Python wrapper for the FACEIT REST API. It supports both synchronous and asynchronous clients, strict type checking (mypy-friendly), Pydantic-based models, and handy utilities for pagination and data access.
Target Audience
Developers who need deep integration with the FACEIT API for analytics, bots, automation, or production services.
The project is under active development, so while it’s usable for many tasks, caution is advised before using it in production.
Comparison
Strict typing: Full support for type hints and mypy.
Sync & async interfaces: Choose whichever style fits your project.
Modern models: All data is modeled with Pydantic for easy validation and autocompletion.
Convenient pagination: Methods like
Compared to existing libraries, faceit-python focuses on modern Python, strict typing, and high code quality.
Feedback, questions, and contributions are very welcome! GitHub: https://github.com/zombyacoff/faceit-python
/r/Python
https://redd.it/1k5idmt
What My Project Does
faceit-python is a high-level, fully type-safe Python wrapper for the FACEIT REST API. It supports both synchronous and asynchronous clients, strict type checking (mypy-friendly), Pydantic-based models, and handy utilities for pagination and data access.
Target Audience
Developers who need deep integration with the FACEIT API for analytics, bots, automation, or production services.
The project is under active development, so while it’s usable for many tasks, caution is advised before using it in production.
Comparison
Strict typing: Full support for type hints and mypy.
Sync & async interfaces: Choose whichever style fits your project.
Modern models: All data is modeled with Pydantic for easy validation and autocompletion.
Convenient pagination: Methods like
.map(), .filter(), and .find() are available on paginated results.Compared to existing libraries, faceit-python focuses on modern Python, strict typing, and high code quality.
Feedback, questions, and contributions are very welcome! GitHub: https://github.com/zombyacoff/faceit-python
/r/Python
https://redd.it/1k5idmt
Faceit
Intro | FACEIT for Developers
We took all our tools, data and APIs being used internally at FACEIT and we made them available to developers to create new apps, to enrich existing websites or even to develop new services. Everything you see on our main website, faceit.com, any small piece…
DjangoCon Europe 2025
If you are attending DjangoCon Europe this week here are my tips to make the most of your experience whether it's your first time or you are a DjangoCon regular!
📆 Plan your talk viewing schedule
⚡ Attend the Lightning Talks
🔄 Network during the breaks
🪩 Attend the social events - this includes the Django.Social after day one in the City Centre (All welcome - details on the discord https://discord.gg/BJyHR63P)
🏃♀️➡️ Get involved in the sprints
💻 Join in on Slack
🔥Don’t burn out
I have expanded on each point here: https://foxleytalent.com/blog/djangocon-europe-2025/
See you in Dublin🍀
/r/django
https://redd.it/1k5hcdl
If you are attending DjangoCon Europe this week here are my tips to make the most of your experience whether it's your first time or you are a DjangoCon regular!
📆 Plan your talk viewing schedule
⚡ Attend the Lightning Talks
🔄 Network during the breaks
🪩 Attend the social events - this includes the Django.Social after day one in the City Centre (All welcome - details on the discord https://discord.gg/BJyHR63P)
🏃♀️➡️ Get involved in the sprints
💻 Join in on Slack
🔥Don’t burn out
I have expanded on each point here: https://foxleytalent.com/blog/djangocon-europe-2025/
See you in Dublin🍀
/r/django
https://redd.it/1k5hcdl
Linkedin
DjangoCon Europe | LinkedIn
DjangoCon Europe | 2,010 followers on LinkedIn. DjangoCon Europe is a five-day international conference about the Django web framework, held each year in Europe. | DjangoCon Europe is run by the community for the community!
Our conference seeks to educate…
Our conference seeks to educate…
Wednesday Daily Thread: Beginner questions
# Weekly Thread: Beginner Questions 🐍
Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.
## How it Works:
1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.
## Guidelines:
This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).
## Recommended Resources:
If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.
## Example Questions:
1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?
Let's help each other learn Python! 🌟
/r/Python
https://redd.it/1k5lh9f
# Weekly Thread: Beginner Questions 🐍
Welcome to our Beginner Questions thread! Whether you're new to Python or just looking to clarify some basics, this is the thread for you.
## How it Works:
1. Ask Anything: Feel free to ask any Python-related question. There are no bad questions here!
2. Community Support: Get answers and advice from the community.
3. Resource Sharing: Discover tutorials, articles, and beginner-friendly resources.
## Guidelines:
This thread is specifically for beginner questions. For more advanced queries, check out our [Advanced Questions Thread](#advanced-questions-thread-link).
## Recommended Resources:
If you don't receive a response, consider exploring r/LearnPython or join the Python Discord Server for quicker assistance.
## Example Questions:
1. What is the difference between a list and a tuple?
2. How do I read a CSV file in Python?
3. What are Python decorators and how do I use them?
4. How do I install a Python package using pip?
5. What is a virtual environment and why should I use one?
Let's help each other learn Python! 🌟
/r/Python
https://redd.it/1k5lh9f
Discord
Join the Python Discord Server!
We're a large community focused around the Python programming language. We believe that anyone can learn to code. | 412982 members
Backend failing to start - Electron react js front end and flask backend
I am developing a desktop app for cross platform users. I packaged backend flask using pyinstaller as a standalone executable file and then built the electron as single executable file for all three platforms using GitHub actions workflow. I am able to run the workflow and download artefacts but when I install the app in my windows I see that the backend is not starting at all. I am new to full stack development and would like to know the possible issues for this to happen. Or is there any way I could package this app but running flask in the local machine is out of scope.
/r/flask
https://redd.it/1k5ix19
I am developing a desktop app for cross platform users. I packaged backend flask using pyinstaller as a standalone executable file and then built the electron as single executable file for all three platforms using GitHub actions workflow. I am able to run the workflow and download artefacts but when I install the app in my windows I see that the backend is not starting at all. I am new to full stack development and would like to know the possible issues for this to happen. Or is there any way I could package this app but running flask in the local machine is out of scope.
/r/flask
https://redd.it/1k5ix19
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
CPython's optimization for doubly linked lists in deque (amortizes 200% link memory overhead)
I was reading through CPython's implementation for `deque` and noticed a simple but generally useful optimization to amortize memory overhead of node pointers and increase cache locality of elements by using fixed length blocks of elements per node, so sharing here.
I'll apply this next when I have the pleasure of writing a doubly linked list.
From: [Modules/\_collectionsmodule.c#L88-L94](https://github.com/python/cpython/blob/b5bf8c80a921679b23548453565f6fd1f79901f2/Modules/_collectionsmodule.c#L88-L94)
* Textbook implementations of doubly-linked lists store one datum
* per link, but that gives them a 200% memory overhead (a prev and
* next link for each datum) and it costs one malloc() call per data
* element. By using fixed-length blocks, the link to data ratio is
* significantly improved and there are proportionally fewer calls
* to malloc() and free(). The data blocks of consecutive pointers
* also improve cache locality.
/r/Python
https://redd.it/1k5nxvt
I was reading through CPython's implementation for `deque` and noticed a simple but generally useful optimization to amortize memory overhead of node pointers and increase cache locality of elements by using fixed length blocks of elements per node, so sharing here.
I'll apply this next when I have the pleasure of writing a doubly linked list.
From: [Modules/\_collectionsmodule.c#L88-L94](https://github.com/python/cpython/blob/b5bf8c80a921679b23548453565f6fd1f79901f2/Modules/_collectionsmodule.c#L88-L94)
* Textbook implementations of doubly-linked lists store one datum
* per link, but that gives them a 200% memory overhead (a prev and
* next link for each datum) and it costs one malloc() call per data
* element. By using fixed-length blocks, the link to data ratio is
* significantly improved and there are proportionally fewer calls
* to malloc() and free(). The data blocks of consecutive pointers
* also improve cache locality.
/r/Python
https://redd.it/1k5nxvt
Reddit
From the Python community on Reddit: CPython's optimization for doubly linked lists in deque (amortizes 200% link memory overhead)
Explore this post and more from the Python community
Where to deploy a simple portfolio project?
Hi guys, as a question states. It was my 3rd approach to railway and I'm giving up a little. Is there any plug and play Django dedicated hosting service? Cheap or free would be preferred.
/r/djangolearning
https://redd.it/1k5h9pk
Hi guys, as a question states. It was my 3rd approach to railway and I'm giving up a little. Is there any plug and play Django dedicated hosting service? Cheap or free would be preferred.
/r/djangolearning
https://redd.it/1k5h9pk
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
lsoph - a TUI for viewing file access by a process
# 📁 `lsoph`
TUI that lists open files for a given process. Uses `strace` by default, but also `psutil` and `lsof` so will sort-of-work on Mac and Windows too.
Usage:
```shell
uvx pip install lsoph
lsoph -p <pid>
```
# [🎬 Demo Video](https://asciinema.org/a/c7T8id39jU7ap6E0D99S5dJ6F)
Project links:
* [🏠 home](https://bitplane.net/dev/python/lsoph)
* [🐱 github](https://github.com/bitplane/lsoph)
* [🐍 pypi](https://pypi.org/project/lsoph)
## Why?
Because I often use `strace` or `lsof` with `grep` to figure out what a program is doing, what files it's opening etc. It's easier than looking for config files. But it gets old fast, what I really want is a list of files for a tree of processes, with the last touched one at the top, so I can see what it's trying to do. And I wan to filter out ones I don't care about. And I want this in a tmux panel too.
So, I'd heard good things about Gemini 2.5 Pro, and figured it'd only take a couple of hours. So I decided to create it as GenAI slop experiment.
This descended into madness over the course of a weekend, with input from ChatGPT and Claude to keep things moving.
**I do not recommend this. Pure AI driven coding is not ready for prime-time**.
Vibe coders, I never realised how bad you have it!
## retro
Here's some notes on
/r/Python
https://redd.it/1k5kj23
# 📁 `lsoph`
TUI that lists open files for a given process. Uses `strace` by default, but also `psutil` and `lsof` so will sort-of-work on Mac and Windows too.
Usage:
```shell
uvx pip install lsoph
lsoph -p <pid>
```
# [🎬 Demo Video](https://asciinema.org/a/c7T8id39jU7ap6E0D99S5dJ6F)
Project links:
* [🏠 home](https://bitplane.net/dev/python/lsoph)
* [🐱 github](https://github.com/bitplane/lsoph)
* [🐍 pypi](https://pypi.org/project/lsoph)
## Why?
Because I often use `strace` or `lsof` with `grep` to figure out what a program is doing, what files it's opening etc. It's easier than looking for config files. But it gets old fast, what I really want is a list of files for a tree of processes, with the last touched one at the top, so I can see what it's trying to do. And I wan to filter out ones I don't care about. And I want this in a tmux panel too.
So, I'd heard good things about Gemini 2.5 Pro, and figured it'd only take a couple of hours. So I decided to create it as GenAI slop experiment.
This descended into madness over the course of a weekend, with input from ChatGPT and Claude to keep things moving.
**I do not recommend this. Pure AI driven coding is not ready for prime-time**.
Vibe coders, I never realised how bad you have it!
## retro
Here's some notes on
/r/Python
https://redd.it/1k5kj23
asciinema.org
lsoph
tui for file monitoring, using `textual` written almost entirely by genai (it sucks)
"How to implement a dynamic invoicing system with separate static content and additional values in Django and React?" Post: Hi everyone, I'm planning to develop an invoicing application where: There is a static content section (such as text and templates) that multiple users can edit dynamically
Hi everyone,
I'm planning to develop an invoicing application where:
There is a static content section (such as text and templates) that multiple users can edit dynamically.
Some additional values (e.g., invoice-specific data) need to be stored separately from the content.
The application’s backend will be built using Django, and the frontend will use React with Material-UI.
Questions:
How do I store dynamic content that multiple users can edit (e.g., using a database like PostgreSQL) and ensure it's easily accessible for updates across different users?
What’s the best way to store the separate values (such as invoice metadata) alongside the content, while keeping the two sets of data modular and easy to manage?
How should I structure my Django models and API to manage both static content and dynamic data efficiently?
Are there any best practices for handling dynamic content updates and storing them securely in a multi-user environment?
Any advice or guidance would be appreciated!
/r/django
https://redd.it/1k5tspx
Hi everyone,
I'm planning to develop an invoicing application where:
There is a static content section (such as text and templates) that multiple users can edit dynamically.
Some additional values (e.g., invoice-specific data) need to be stored separately from the content.
The application’s backend will be built using Django, and the frontend will use React with Material-UI.
Questions:
How do I store dynamic content that multiple users can edit (e.g., using a database like PostgreSQL) and ensure it's easily accessible for updates across different users?
What’s the best way to store the separate values (such as invoice metadata) alongside the content, while keeping the two sets of data modular and easy to manage?
How should I structure my Django models and API to manage both static content and dynamic data efficiently?
Are there any best practices for handling dynamic content updates and storing them securely in a multi-user environment?
Any advice or guidance would be appreciated!
/r/django
https://redd.it/1k5tspx
Reddit
From the django community on Reddit: "How to implement a dynamic invoicing system with separate static content and additional values…
Posted by mr_soul_002 - 0 votes and 3 comments
Work offering to pay for a python course. Any recommendations on courses?
My employer has offered to pay for me to take a python course on company time but has requested that I pick the course myself.
It needs to be self paced so I can work around it without having to worry about set deadlines. Having a bit of a hard time finding courses that meet that requirement.
Anyone have suggestions or experience with good courses that fit the bill?
/r/Python
https://redd.it/1k5awlb
My employer has offered to pay for me to take a python course on company time but has requested that I pick the course myself.
It needs to be self paced so I can work around it without having to worry about set deadlines. Having a bit of a hard time finding courses that meet that requirement.
Anyone have suggestions or experience with good courses that fit the bill?
/r/Python
https://redd.it/1k5awlb
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
How to extract data from Wikipedia for a specific category?
Hey everyone,
I'm looking for the best way to extract data from Wikipedia, but only for a specific category and its subcategories (for example: "Nobel laureates").
/r/Python
https://redd.it/1k5w65s
Hey everyone,
I'm looking for the best way to extract data from Wikipedia, but only for a specific category and its subcategories (for example: "Nobel laureates").
/r/Python
https://redd.it/1k5w65s
Reddit
From the Python community on Reddit
Explore this post and more from the Python community
Flask run server
Hey guys a learn flask whit cs50x course. And i make a web app to mage clients of my entrepreneurship. What would be the cheapeast way to have this aplication running whithout it runing a computer?
I thought I could load it onto a flash drive and connect it to the router so the file is local, then run it from a PC. That way, I can access it from all my devices.
pd( no se nada sobre servidores ni seguridad en la web)
/r/flask
https://redd.it/1k4chqu
Hey guys a learn flask whit cs50x course. And i make a web app to mage clients of my entrepreneurship. What would be the cheapeast way to have this aplication running whithout it runing a computer?
I thought I could load it onto a flash drive and connect it to the router so the file is local, then run it from a PC. That way, I can access it from all my devices.
pd( no se nada sobre servidores ni seguridad en la web)
/r/flask
https://redd.it/1k4chqu
Reddit
From the flask community on Reddit
Explore this post and more from the flask community
Meta leads linking with django app
I am currently developing a crm with django. I need to get the leads generated from meta platforms in my app. Also need the ads and campaigns. How can I get the leads once generated from meta? Also how to get the ads and campaigns that are currently active?
I checked out meta developers docs and didn't get a clear picture.
/r/django
https://redd.it/1k5wxe0
I am currently developing a crm with django. I need to get the leads generated from meta platforms in my app. Also need the ads and campaigns. How can I get the leads once generated from meta? Also how to get the ads and campaigns that are currently active?
I checked out meta developers docs and didn't get a clear picture.
/r/django
https://redd.it/1k5wxe0
Reddit
From the django community on Reddit
Explore this post and more from the django community
Advanced Alchemy 1.0 - A framework agnostic library for SQLAlchemy
# Introducing Advanced Alchemy
Advanced Alchemy is an optimized companion library for SQLAlchemy, designed to supercharge your database models with powerful tooling for migrations, asynchronous support, lifecycle hook and more.
You can find the repository and documentation here:
- GitHub Repository
- Official Documentation
## What Advanced Alchemy Does
Advanced Alchemy extends SQLAlchemy with productivity-enhancing features, while keeping full compatibility with the ecosystem you already know.
At its core, Advanced Alchemy offers:
- Sync and async repositories, featuring common CRUD and highly optimized bulk operations
- Integration with major web frameworks including Litestar, Starlette, FastAPI, Flask, and Sanic (additional contributions welcomed)
- Custom-built alembic configuration and CLI with optional framework integration
- Utility base classes with audit columns, primary keys and utility functions
- Built in
- Unified interface for various storage backends (`fsspec` and `obstore`)
- Optional lifecycle event hooks integrated with SQLAlchemy's event system to automatically save and delete files as records are inserted, updated, or deleted
- Optimized JSON types including a custom JSON type for Oracle
- Integrated support for UUID6 and UUID7 using `uuid-utils` (install with the
- Integrated support for Nano ID using `fastnanoid` (install with the
- Pre-configured base classes with audit
/r/Python
https://redd.it/1k5z534
# Introducing Advanced Alchemy
Advanced Alchemy is an optimized companion library for SQLAlchemy, designed to supercharge your database models with powerful tooling for migrations, asynchronous support, lifecycle hook and more.
You can find the repository and documentation here:
- GitHub Repository
- Official Documentation
## What Advanced Alchemy Does
Advanced Alchemy extends SQLAlchemy with productivity-enhancing features, while keeping full compatibility with the ecosystem you already know.
At its core, Advanced Alchemy offers:
- Sync and async repositories, featuring common CRUD and highly optimized bulk operations
- Integration with major web frameworks including Litestar, Starlette, FastAPI, Flask, and Sanic (additional contributions welcomed)
- Custom-built alembic configuration and CLI with optional framework integration
- Utility base classes with audit columns, primary keys and utility functions
- Built in
File Object data type for storing objects:- Unified interface for various storage backends (`fsspec` and `obstore`)
- Optional lifecycle event hooks integrated with SQLAlchemy's event system to automatically save and delete files as records are inserted, updated, or deleted
- Optimized JSON types including a custom JSON type for Oracle
- Integrated support for UUID6 and UUID7 using `uuid-utils` (install with the
uuid extra)- Integrated support for Nano ID using `fastnanoid` (install with the
nanoid extra)- Pre-configured base classes with audit
/r/Python
https://redd.it/1k5z534
GitHub
GitHub - litestar-org/advanced-alchemy: A carefully crafted, thoroughly tested, optimized companion library for SQLAlchemy
A carefully crafted, thoroughly tested, optimized companion library for SQLAlchemy - litestar-org/advanced-alchemy
Template tag hack to reduce SQL queries in templates... am I going to regret this later?
A while back I managed to pare down a major view from ≈360 SQL queries to ≈196 (a 45% decrease!) by replacing major parts of templates with the following method:
* Make a new template tag i.e. `render_header(obj_in):`
* grab "`obj`" as a queryset of `obj_in`(or grab directly from `obj_in`, whichever results in less queries at the end)
* gradually generate the output HTML by grabbing properties of "`obj`"
* register.filter and load into template
* replace the existing HTML to generate from the template tag i.e.`{{post|render_header|safe}}`
For example, here is what it looks like in the template:
{% load onequerys %}
<header class="post-head">{{post|render_header|safe}}</header>
And in `(app)/templatetags/onequerys.py`:
def render_header(obj_in):
post = obj_in # grab directly or do Post.objects.get(id=obj_in.id)
final = f" -- HTML is assembled here from the properties of {post}... -- "
return final
register.filter("render_header", render_header)
So far this works like a charm but I'm wondering... I haven't seen anyone else do this online and I wonder if it's for a good reason. Could this cause any
/r/djangolearning
https://redd.it/1k2x0zs
A while back I managed to pare down a major view from ≈360 SQL queries to ≈196 (a 45% decrease!) by replacing major parts of templates with the following method:
* Make a new template tag i.e. `render_header(obj_in):`
* grab "`obj`" as a queryset of `obj_in`(or grab directly from `obj_in`, whichever results in less queries at the end)
* gradually generate the output HTML by grabbing properties of "`obj`"
* register.filter and load into template
* replace the existing HTML to generate from the template tag i.e.`{{post|render_header|safe}}`
For example, here is what it looks like in the template:
{% load onequerys %}
<header class="post-head">{{post|render_header|safe}}</header>
And in `(app)/templatetags/onequerys.py`:
def render_header(obj_in):
post = obj_in # grab directly or do Post.objects.get(id=obj_in.id)
final = f" -- HTML is assembled here from the properties of {post}... -- "
return final
register.filter("render_header", render_header)
So far this works like a charm but I'm wondering... I haven't seen anyone else do this online and I wonder if it's for a good reason. Could this cause any
/r/djangolearning
https://redd.it/1k2x0zs
Reddit
From the djangolearning community on Reddit
Explore this post and more from the djangolearning community
Declarative GUI toolkit - Slint 1.11 upgrades Python Bindings to Beta 🚀
We're delighted to release Slint 1.11 with two exciting updates:
✅ Live-Preview features Color & Gradient pickers,
✅ Python Bindings upgraded to Beta.
Speed up your UI development with visual color selection and more robust Python support. Check it out - https://slint.dev/blog/slint-1.11-released
/r/Python
https://redd.it/1k5wqpr
We're delighted to release Slint 1.11 with two exciting updates:
✅ Live-Preview features Color & Gradient pickers,
✅ Python Bindings upgraded to Beta.
Speed up your UI development with visual color selection and more robust Python support. Check it out - https://slint.dev/blog/slint-1.11-released
/r/Python
https://redd.it/1k5wqpr
slint.dev
Slint 1.11 Released
Slint 1.11 adds Color Pickers to Live-Preview and upgrades Python Bindings to Beta
Goombay: For all your sequence alignment needs
# Goombay
If you have any questions or ideas, feel free to leave them in this project's [discord server](https://discord.gg/SDUNcjzaEh)! There are also several other bioinformatics-related projects, a website, and a game in the works!
# What My Project Does
**Goombay** is a Python project which contains several sequence alignment algorithms. This package can calculate distance (and similarity), show alignment, and display the underlying matrices for Needleman-Wunsch, Gotoh, Smith-Waterman, Wagner-Fischer, Waterman-Smith-Beyer, Lowrance-Wagner, Longest Common Subsequence, and Shortest Common Supersequence algorithms! With more alignment algorithms to come!
**Main Features**
* Global and Local sequence alignment
* Common method interface between classes for ease of use
* Class-based and instance-based use (customizable parameters)
* Scoring, matrix visualization, and formatted sequence alignment
* Thorough testing
For all features check out the full readme at [GitHub](https://github.com/lignum-vitae/goombay) or [PyPI](https://pypi.org/project/goombay/).
# Target Audience
This API is designed for researchers or any programmer looking to use sequence alignment in their workflow.
# Comparison
There are many other examples of sequence alignment PyPI packages but my specific project was meant to expand on the functionality of [textdistance](https://github.com/life4/textdistance)! In addition to adding more choices, this project also adds a few algorithms not present in textdistance!
# Basic Example
from goombay import needleman_wunsch
print(needleman_wunsch.distance("ACTG","FHYU"))
# 4
/r/Python
https://redd.it/1k6259g
# Goombay
If you have any questions or ideas, feel free to leave them in this project's [discord server](https://discord.gg/SDUNcjzaEh)! There are also several other bioinformatics-related projects, a website, and a game in the works!
# What My Project Does
**Goombay** is a Python project which contains several sequence alignment algorithms. This package can calculate distance (and similarity), show alignment, and display the underlying matrices for Needleman-Wunsch, Gotoh, Smith-Waterman, Wagner-Fischer, Waterman-Smith-Beyer, Lowrance-Wagner, Longest Common Subsequence, and Shortest Common Supersequence algorithms! With more alignment algorithms to come!
**Main Features**
* Global and Local sequence alignment
* Common method interface between classes for ease of use
* Class-based and instance-based use (customizable parameters)
* Scoring, matrix visualization, and formatted sequence alignment
* Thorough testing
For all features check out the full readme at [GitHub](https://github.com/lignum-vitae/goombay) or [PyPI](https://pypi.org/project/goombay/).
# Target Audience
This API is designed for researchers or any programmer looking to use sequence alignment in their workflow.
# Comparison
There are many other examples of sequence alignment PyPI packages but my specific project was meant to expand on the functionality of [textdistance](https://github.com/life4/textdistance)! In addition to adding more choices, this project also adds a few algorithms not present in textdistance!
# Basic Example
from goombay import needleman_wunsch
print(needleman_wunsch.distance("ACTG","FHYU"))
# 4
/r/Python
https://redd.it/1k6259g
Discord
Join the Lignum Vitae Discord Server!
Discord server to support collaborative GitHub projects between members | 29 members