Python Daily
2.57K subscribers
1.48K photos
53 videos
2 files
38.9K links
Daily Python News
Question, Tips and Tricks, Best Practices on Python Programming Language
Find more reddit channels over at @r_channels
Download Telegram
Passing variable within string to TemplateTag?

Is it possible to somehow render a variable within a string when passing it into a template tag?

This is what I would like to do:

{% my_template_tag src="images/brand/{{ image_name }}.jpg alt="{{ image_name }} loading="lazy" %}

Or is the only way to rewrite the template tag to take in `*args` and then do something like this?

{% with src='images/brand/'|add:image_name|add:'.jpg' %}
#tag info here
{% endwith %}

​

/r/django
https://redd.it/1c7l3l6
Basic Memory: A Python-based Local-First Knowledge Graph for LLMs

# What My Project Does

Basic Memory is an open-source Python tool that creates a persistent knowledge graph from standard Markdown files to enhance LLM interactions. It works by:

* Using simple Markdown files as the primary storage medium
* Extracting semantic meaning from markdown patterns to build a knowledge graph
* Providing bi-directional synchronization between files and graph structure
* Integrating with Claude Desktop via the Model Context Protocol (MCP)

The system extracts semantic meaning from simple Markdown patterns:

- [category] Observation about a topic #tag (optional context)
- relation_type [[WikiLink]] (optional context)

Check out a short demo video showing Basic Memory in action: [https://basicmachines.co/images/Claude-Obsidian-Demo.mp4](https://basicmachines.co/images/Claude-Obsidian-Demo.mp4)

GitHub: [https://github.com/basicmachines-co/basic-memory](https://github.com/basicmachines-co/basic-memory)

Documentation: [https://memory.basicmachines.co/](https://memory.basicmachines.co/)

# Target Audience

Basic Memory is intended for:

* Researchers and knowledge workers who need to maintain context across multiple LLM conversations
* Developers working on LLM-powered applications who need a persistent memory layer
* Obsidian users looking to enhance their notes with AI capabilities
* Anyone looking for a production-ready, local-first solution for AI memory that respects data ownership

This is a fully functional production tool, not just a toy project. It's designed with data privacy in mind - everything stays on your local machine.

# Comparison

Unlike other memory solutions for LLMs:

* **vs. Built-in LLM memory** (like ChatGPT's memory): Basic

/r/Python
https://redd.it/1jctt1v