explaingit

itsdersty/django-neural-feed

Analysis updated 2026-05-18

16PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

TLDR

A Django library that adds AI-powered personalized content feeds by storing user preference vectors in PostgreSQL and scoring content by similarity, recency, and popularity in a single query.

Mindmap

mindmap
  root((Django Neural Feed))
    What it does
      Personalized feeds
      Vector scoring
      User profiles
    Tech
      PostgreSQL pgvector
      Django signals
      Celery async
    Config
      Feed class
      Encoder choice
      Scoring weights
    Audience
      Django developers
      Social platforms
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Add a personalized content feed to a Django social platform without modifying existing interaction tables

USE CASE 2

Score and rank content by combining semantic similarity, recency, and custom popularity signals in one SQL query

USE CASE 3

Run multiple independent personalized feeds for different content types in the same Django project

What is it built with?

PythonDjangoPostgreSQLpgvectorCelerysentence-transformers

How does it compare?

itsdersty/django-neural-feedadya84/ha-world-cup-2026afk-surf/safeclipper
Stars161616
LanguagePythonPythonPython
Setup difficultymoderateeasymoderate
Complexity3/52/53/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires PostgreSQL 12+ with the pgvector extension enabled.

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

In plain English

Django Neural Feed (DNF) is a Python library that adds personalized content recommendation feeds to Django applications. It works by storing vector embeddings of content items in PostgreSQL using the pgvector extension, which allows similarity calculations to happen inside the database rather than in application code. When a user interacts with content, the library builds a vector profile of that user's preferences, then scores new content items by combining similarity to that profile with how recent the content is and how popular it is, all in a single database query. The library is installed as a Django package. You configure it by creating a feed class that specifies which content model to track, which interaction model to monitor (such as a likes table), and how to weight similarity against freshness and popularity. The library attaches to your models through Django signals, so you do not need to modify your existing interaction tables. User preference profiles are stored separately from the main user model, one profile per feed type. This means you can run multiple feeds with different configurations for different parts of your application without them interfering with each other. Background work such as generating embeddings and aggregating user vectors can run through Celery for async processing, with an automatic fallback to synchronous background threads if no Celery broker is running. The default encoder for generating embeddings uses sentence-transformers, which is an optional install since it pulls in PyTorch. If you have a custom encoder such as OpenAI or a hosted API, you can skip the local model entirely. The README includes detailed code examples for all configuration steps, including model setup, feed class definition, and querying for personalized results. This library is aimed at Django developers building content-heavy applications where personalized ordering matters, such as social platforms, news feeds, or content aggregators.

Copy-paste prompts

Prompt 1
Walk me through adding django-neural-feed to an existing Django project with a Post model and a Likes many-to-many table.
Prompt 2
How do I configure a custom encoder class in django-neural-feed to use OpenAI embeddings instead of sentence-transformers?
Prompt 3
Write a BaseNeuralFeed subclass for a news article model with freshness decay and popularity weighting.
Prompt 4
How does django-neural-feed store user profiles, and how do I call the feed to get personalized results for a given user?

Frequently asked questions

What is django-neural-feed?

A Django library that adds AI-powered personalized content feeds by storing user preference vectors in PostgreSQL and scoring content by similarity, recency, and popularity in a single query.

What language is django-neural-feed written in?

Mainly Python. The stack also includes Python, Django, PostgreSQL.

What license does django-neural-feed use?

MIT license: use freely for any purpose, including commercial use, as long as you keep the copyright notice.

How hard is django-neural-feed to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is django-neural-feed for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub itsdersty on gitmyhub

Verify against the repo before relying on details.