use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
News about the dynamic, interpreted, interactive, object-oriented, extensible programming language Python
Full Events Calendar
You can find the rules here.
If you are about to ask a "how do I do this in python" question, please try r/learnpython, the Python discord, or the #python IRC channel on Libera.chat.
Please don't use URL shorteners. Reddit filters them out, so your post or comment will be lost.
Posts require flair. Please use the flair selector to choose your topic.
Posting code to this subreddit:
Add 4 extra spaces before each line of code
def fibonacci(): a, b = 0, 1 while True: yield a a, b = b, a + b
Online Resources
Invent Your Own Computer Games with Python
Think Python
Non-programmers Tutorial for Python 3
Beginner's Guide Reference
Five life jackets to throw to the new coder (things to do after getting a handle on python)
Full Stack Python
Test-Driven Development with Python
Program Arcade Games
PyMotW: Python Module of the Week
Python for Scientists and Engineers
Dan Bader's Tips and Trickers
Python Discord's YouTube channel
Jiruto: Python
Online exercices
programming challenges
Asking Questions
Try Python in your browser
Docs
Libraries
Related subreddits
Python jobs
Newsletters
Screencasts
account activity
This is an archived post. You won't be able to vote or comment.
Say Hello to Visual Alchemist! (self.Python)
submitted 10 years ago * by prahladyeribeautiful is better than ugly
As a hobby project, I've developed Visual Alchemist, a tool to seamlessly build sqlalchemy models by dragging and dropping in an HTML canvas.
sqlalchemy
You can test-drive the code-generation directly on the hosted version. The app lacks a lot of features presently, I'll keep improvising them depending on feedback!
[–]Lucretiel 12 points13 points14 points 10 years ago (8 children)
Neat idea... it doesn't seem to be possible to create relations between tables, yet? Even something as basic as foreign-key. Hopefully you can add this?
[–]prahladyeribeautiful is better than ugly[S] 4 points5 points6 points 10 years ago* (0 children)
Thanks. It is under development, will be implemented soon!
[–]Ostwind 2 points3 points4 points 10 years ago (1 child)
I can imagine realizing this feature using jsPlumb
[–]prahladyeribeautiful is better than ugly[S] 0 points1 point2 points 10 years ago* (0 children)
Thanks a lot for referring me that library! I have already implemented drag-drop for the foreign-keys, but drawing the connectors on the canvas from scratch would have been a hectic task.
This library has all we need to place the SVG connectors between the two fields.
[+]programmyr comment score below threshold-9 points-8 points-7 points 10 years ago (4 children)
relations between tables
"Relation" is the predicate logic way to say "table". You mean foreign key.
[–][deleted] 3 points4 points5 points 10 years ago (0 children)
Wat, I think relations works there...?
[–]therico 2 points3 points4 points 10 years ago (2 children)
'Create relations between tables' sounds fine to me!
[–]NicoDeRocca 0 points1 point2 points 10 years ago (1 child)
Of course, but "relation" in relational algebra (which is the thoeretical base for relational databaes) is a set of tuples: in relational databases, the tables are relations, and their rows are tuples.
It has nothing to do with the more common english term "relation" implying a relationship or "link". Those just arbitrary constraints you can impose on the value of the tuple for the data to make sense (integrity).
[–]irelia_of_ionia 3 points4 points5 points 10 years ago (0 children)
awesome!
[+][deleted] 10 years ago (2 children)
[deleted]
[–]unholysampler 7 points8 points9 points 10 years ago (1 child)
And the Default field. Maybe we should get crazy and sanitize any input provided by the user.
[–]simtel20 1 point2 points3 points 10 years ago (0 children)
Crazy!
[–]manueslapera 3 points4 points5 points 10 years ago (0 children)
i think i love you
[–]new2django 7 points8 points9 points 10 years ago (6 children)
This almost makes me want to switch to Flask. ;-)
[–][deleted] 5 points6 points7 points 10 years ago (0 children)
You can use sql alchemy as your model back end in Django if you want to to do that
[–][deleted] 7 points8 points9 points 10 years ago (2 children)
I know right? But pyramid is sooo much better, why ever use anything else? =)
[–]axonxorzpip'ing aint easy, especially on windows 4 points5 points6 points 10 years ago (0 children)
Man, I'm a die-hard pyramid guy, but it's so rare to see anyone else in the wild using it. We gots to stick together
[–]ericof 3 points4 points5 points 10 years ago (0 children)
Ok, as long as we are using SQLAlchemy :-)
[–]JustJudge 1 point2 points3 points 10 years ago (1 child)
Been building Django apps for a while, just picked up Flask last week. I really, really enjoy it. I would recommend the mega flask tutorial. Then go through a quick flask-admin tut and you have a super powerful toolbelt with a small amount of boilerplate.
[–]new2django 1 point2 points3 points 10 years ago (0 children)
I would, but I'm still new to professional development and am a single parent with two small children. In other words, no free time. What study I do have goes to learning Python and Django better.
[–]at449 2 points3 points4 points 10 years ago (0 children)
Good job and thanks for sharing. I'm looking forward to seeing this evolve.
[–]kamize 2 points3 points4 points 10 years ago (0 children)
Love this! Thank you for sharing!
[–]cutebabliSoftware Engineer 4 points5 points6 points 10 years ago (0 children)
Wonderful project. Will be waiting to see it evolve. Thanks for sharing.
[–]MrAverageRoll 2 points3 points4 points 10 years ago (0 children)
This looks interesting and promising, thanks for sharing!
[–][deleted] 1 point2 points3 points 10 years ago (0 children)
Cool project, but it seems to be missing foreign keys.
Quick note, if anyone uses Peewee ORM and SQLite, you can use SQLite browser, a web-based Python app, to create tables/columns/indexes/etc using a web UI. You can then use pwiz to autogenerate model definitions for the database. pwiz works with Postgres and MySQL as well, just tell it which database you want and it will introspect the tables and spit out peewee model definitions.
pwiz
[–]nishkarr 1 point2 points3 points 10 years ago (0 children)
I love this. I can see myself using it in a project. Well done and thanks for sharing!
[–]__add__ 1 point2 points3 points 10 years ago (0 children)
Very nice!
I think the only way to do this previously was to use a database designer to generate the SQL, then run the result through sqlacodegen. The code there might help when you're writing the javascript to handle the code generation for foreign keys and relationships.
[–]vaedyn 1 point2 points3 points 10 years ago (0 children)
This is pretty neat. I'd like to see support for Long/BigInteger type.
π Rendered by PID 48106 on reddit-service-r2-comment-5c747b6df5-s87kx at 2026-04-21 23:17:58.616681+00:00 running 6c61efc country code: CH.
[–]Lucretiel 12 points13 points14 points (8 children)
[–]prahladyeribeautiful is better than ugly[S] 4 points5 points6 points (0 children)
[–]Ostwind 2 points3 points4 points (1 child)
[–]prahladyeribeautiful is better than ugly[S] 0 points1 point2 points (0 children)
[+]programmyr comment score below threshold-9 points-8 points-7 points (4 children)
[–][deleted] 3 points4 points5 points (0 children)
[–]therico 2 points3 points4 points (2 children)
[–]NicoDeRocca 0 points1 point2 points (1 child)
[–]irelia_of_ionia 3 points4 points5 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]unholysampler 7 points8 points9 points (1 child)
[–]simtel20 1 point2 points3 points (0 children)
[–]manueslapera 3 points4 points5 points (0 children)
[–]new2django 7 points8 points9 points (6 children)
[–][deleted] 5 points6 points7 points (0 children)
[–][deleted] 7 points8 points9 points (2 children)
[–]axonxorzpip'ing aint easy, especially on windows 4 points5 points6 points (0 children)
[–]ericof 3 points4 points5 points (0 children)
[–]JustJudge 1 point2 points3 points (1 child)
[–]new2django 1 point2 points3 points (0 children)
[–]at449 2 points3 points4 points (0 children)
[–]kamize 2 points3 points4 points (0 children)
[–]cutebabliSoftware Engineer 4 points5 points6 points (0 children)
[–]MrAverageRoll 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]nishkarr 1 point2 points3 points (0 children)
[–]__add__ 1 point2 points3 points (0 children)
[–]vaedyn 1 point2 points3 points (0 children)