Python logic-programming

Open-source Python projects categorized as logic-programming

Top 5 Python logic-programming Projects

logic-programming
  1. pyswip

    PySwip is a Python-Prolog interface that enables querying SWI-Prolog in your Python programs.

  2. Civic Auth

    Simple auth for Python backends. Drop Civic Auth into your Python backend with just a few lines of code. Email login, SSO, and route protection built-in. Minimal config. Works with FastAPI, Flask, or Django.

    Civic Auth logo
  3. PyNeuraLogic

    PyNeuraLogic lets you use Python to create Differentiable Logic Programs

  4. pyreason

    An explainable inference software supporting annotated, real valued, graph based and temporal logic

    Project mention: Prolog's Eternal September (2017) | news.ycombinator.com | 2025-05-10

    Do look up annotated logic: https://www.sciencedirect.com/science/article/pii/0743106692... as e.g. utilized by https://github.com/lab-v2/pyreason which is the best summation of the various fuzzy logics more modern prologs experimented with

  5. kanren

    An extensible, lightweight relational/logic programming DSL written in pure Python

    Project mention: What Is miniKanren? | news.ycombinator.com | 2025-01-02

    Is that even possible for something like this? You've got a pretty long list of implementations, each having its own language specific syntax, e.g. https://github.com/pythological/kanren for one python version - and there are several Python versions linked on the homepage.

  6. pyreason-gym

    An OpenAI wrapper for PyReason to use in a Grid World reinforcement learning setting

  7. Sevalla

    Deploy and host your apps and databases, now with $50 credit! Sevalla is the PaaS you have been looking for! Advanced deployment pipelines, usage-based pricing, preview apps, templates, human support by developers, and much more!

    Sevalla logo
NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

Python logic-programming discussion

Log in or Post with

Python logic-programming related posts

  • PyReason: Explainable inference for annotated, real valued, graph based and tem

    1 project | news.ycombinator.com | 8 Apr 2025
  • Scallop – A Language for Neurosymbolic Programming

    2 projects | news.ycombinator.com | 22 Mar 2025
  • Kanren: An extensible, lightweight relational/logic programming DSL in Python

    1 project | news.ycombinator.com | 3 Feb 2024
  • When do you use generators?

    1 project | /r/Python | 21 Mar 2022
  • Five-minute Multimethods in Python by Guido van Rossum - March 30, 2005

    1 project | /r/Python | 1 Mar 2021
  • A note from our sponsor - Civic Auth
    www.civic.com | 31 Aug 2025
    Drop Civic Auth into your Python backend with just a few lines of code. Email login, SSO, and route protection built-in. Minimal config. Works with FastAPI, Flask, or Django. Learn more →

Index

What are some of the best open-source logic-programming projects in Python? This list will help you:

# Project Stars
1 pyswip 521
2 PyNeuraLogic 294
3 pyreason 291
4 kanren 217
5 pyreason-gym 31

Sponsored
Simple auth for Python backends
Drop Civic Auth into your Python backend with just a few lines of code. Email login, SSO, and route protection built-in. Minimal config. Works with FastAPI, Flask, or Django.
www.civic.com

Did you know that Python is
the 2nd most popular programming language
based on number of references?