19 comments

[ 6.0 ms ] story [ 28.3 ms ] thread
Very very cool. With a django-admin style gui, and some method of auth, this could make prototyping new apps extremely quick for legacy (or other-department maintained) databases.
I've messed with inspectdb a few times, it's a good trick to know if you're in the land of django:

https://docs.djangoproject.com/en/dev/howto/legacy-databases...

Caveat: It's also frigging miserable if you are in the minority of developers using Django with Oracle DB. It gets quite a bit wrong, but my main gripe is that I can't inspectdb against an Oracle table and then syncdb the resultant models and get the same (or even necessarily working) tables.

YMMV.

Your wish is my command. Django-style admin GUI added! Check out the GitHub page for a screenshot.

Authentication is next on my list...

Nice. I could've used this earlier. Tastypie is nice, but it really kinda assumes your models and relationships are already designed for a public API.
A few lines of code added on django-admin will get you this as well.
New to django, care to share a link?
from app.models import ModelName

admin.site.register(ModelName)

Django documentation for this: https://docs.djangoproject.com/en/dev/ref/contrib/admin/

The point is, with Django you'd have to painstakingly reverse-engineer a Django Model from your existing database. sandman does all of this without writing any boilerplate code (aside from listing the names of the tables you want included in your API).

The difference in LOC and general frustration is huge.

I agree that is extremely awesome. I was just responding to his question. I have already started playing with your project, and have enjoyed experimenting with it.
I really hope this makes it to production. I'll be contributing code and money to see that happen. Thanks for this extremely useful tool.
Contributions are always welcome. I've been making reasonably quick progress on it and it's getting more robust by the day. Already added features include a Django-style admin interface, user-defined HTTP methods per Model, and user-defined, per-method validation.

The two main features needed to make sandman really usable are authentication and the generation of "rel" links automatically from foreign key information. I'm working on authentication as we speak...

Over the past few years we've also been working on a HTTP based API for SQL databases -- http://htsql.org; it has insert/update/delete features in a plugin.
Anyone know of a PHP version of this? Would make my life so much easier.
Why would you need a PHP version? If you like this idea, just use this and consume the services with your PHP front end.
As a for instance, PHP has a native driver for Microsoft SQL services.
A php version would be useful for someone with an existing php project who doesn't want to add another tech stack to their build/deploy/host requirements. This is especially useful for authors who might target customers self-hosting on low cost shared hosting services, where php & mysql is ubiquitous.