Garet
Garet

Reputation: 365

Integrate Django with others not web systems in python

I have a theoretical question about how integrate django with others subsystems not web oriented. I don't know if it is possible develop this class of systems with django or if there are another best alternative (another web framework).

I propose a possible system with this requirements and the structure that I would develop.

For example:

My idea for this architecture is as follows:

project_dir
| --- __init__.py
| --- main_system (eg: calculus, task in background, daemons...)
_____| --- __init__.py
_____| --- modules of this subsystem
| --- data_and_persistence
_____| --- __init__.py
_____| --- models (ORMs, SQL, ad hoc solutions,...)
| --- common_modules
_____| --- __init__.py
_____| --- auxiliar common modules
| --- command_line_interface
_____| --- __init__.py
_____| --- command_line_interface_modules
| --- web_interface
_____| --- __init__.py
_____| --- django project here
| --- test
_____| --- __init__.py
_____| --- test of all susbsystems

There are the following layers (summarized):

I have found some problems with this solution:

What things would you change? How would you do it?

Regards

Upvotes: 1

Views: 186

Answers (1)

schillingt
schillingt

Reputation: 13731

It sounds like a Django/Celery combination would satisfy your requirements (except for the one that says you don't want to use Django).

  • Django provides you with the ability to create custom actions off of the command line.
  • Django provides you with the web interface.
  • Celery allows you to do the hard calculations asynchronously.
  • You'll be able to use the Django ORM so you don't have multiple model definitions.

Upvotes: 1

Related Questions