Some of the most important layers in the CKAN code architecture, going from lowest-level up to highest-level:
##Database
CKAN uses SQLAlchemy (http://www.sqlalchemy.org/) to handle communication between CKAN source code and the PostgreSQL database (http://www.postgresql.org/).