开发者

Can Django be used for non web apps?

开发者 https://www.devze.com 2022-12-24 03:32 出处:网络
I noticed in the main Django introductin they show a feature that maps python objects to the database. This doesn\'t strike me as being mutually exclusive with with development, is there any reason wh

I noticed in the main Django introductin they show a feature that maps python objects to the database. This doesn't strike me as being mutually exclusive with with development, is there any reason why this can't be used for non web apps? Is it easy to separate o开发者_C百科ut?


The part you're mentioning is the ORM and yes, ORMs are useful besides web development. In theory you could use the Django ORM for non-web stuff. However this can be a bit complicated because it is not released separately so you'd have to extract the code yourself (or you have to include the whole django package).

There are a lot of other ORMs in Python that you can use standalone way easier. My favorite is SQLAlchemy (http://www.sqlalchemy.org/), but there are others like storm and SQLObject.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号