IT'S TRICKY to find out how to set up RDFLib Graph to use a RDBS backend, but it can be done using SQLAlchemy and RDFLib-SQLAlchemy. This means it'll support all the engines SQLAlchemy does, including MySQL and Postgres. I'll highlight two gotchas to look out for when using RDFLib-SQLAlchemy and walk you through getting setup using a wrapper class to RDFLIB Graph.
USE THE internet as a database. Across the internet, some generous providers make their data available not only as RDF/OWL, but via a SPARQL endpoint that you can send queries to. It's like an API, but instead of getting a response with all the data the developer thought you might like, you get the results of the query you want. It's even possible to query across multiple endpoints in a single query. SPARQL is similar enough to SQL to be easy to learn. In this post, we start out looking at SELECT queries against DBpedia.
PYWEEK CHALLENGE 25: Two Worlds, Complete. My entry is submitted, it works, now my real work begins. I intended to create a game similar to the original Rogue, but divided into normal and magical realms. I feel I have achieved this. Now it's time to make it better.
DAY 4 of PyWeek. If it looks like a game, and plays like a game, it's a game! Rogue: Through The Veil is starting to look and play like a game now. It's got monsters, combat, potions, scrolls, weapons and armour. Plus we can now go "through the veil" and pass between magic and normal worlds.
DAY 3 of the PyWeek 25, Two Worlds challenge, and progress is being made. Today we've got more monsters, weapons, armour, scrolls, menus and an improved melee combat system. Lots done, some incomplete and lots still to do. Feeling rushed, worrying about code getting messy.
AN INTRODUCTION to programming the Semantic Web using Python and Flask. We'll make an RDF file to describe ourselves, serve it via Flask, use data from it in a template, encode it into our HTML, and link to it from our HTML.
OF ALL the functional programming inspired features in Python, partial application must be the best kept secret that you really need to know. Partial application lets you create highly abstract functions and make them more specific for use, pass a function arguments without calling it yet, and so much more.