Skip to content

Commit 1d93944

Browse files
committed
work on book transformation to pdf
1 parent 31e80bf commit 1d93944

File tree

2 files changed

+99
-48
lines changed

2 files changed

+99
-48
lines changed

content/pages/03-data/05-object-relational-mappers.markdown

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ slug: object-relational-mappers-orms
44
sortorder: 0305
55
toc: False
66
sidebartitle: Object-relational Mappers
7-
meta: Object-relational mappers (ORMs) bridge relational databases and object-oriented code. Learn more on Full Stack Python.
7+
meta: Object-relational mappers (ORMs) bridge relational databases and data represented in Python code.
88

99

1010
# Object-relational mappers (ORMs)
@@ -15,7 +15,7 @@ are more commonly used in application code.
1515
<img src="/img/visuals/orms-bridge.png" width="100%" alt="Diagram showing how object-relational mappers bridge the database and Python objects." class="technical-diagram" />
1616

1717

18-
## Why are ORMs useful?
18+
### Why are ORMs useful?
1919
ORMs provide a high-level abstraction upon a
2020
[relational database](/databases.html) that allows a developer to write
2121
Python code instead of SQL to create, read, update and delete data and
@@ -167,15 +167,15 @@ best to read up on advanced use cases and tools for doing your best work
167167
within the existing framework.
168168

169169

170-
### SQLAlchemy
170+
### SQLAlchemy ORM
171171
[SQLAlchemy](http://www.sqlalchemy.org/) is a well-regarded
172172
Python ORM because it gets the abstraction level "just right" and
173173
seems to make complex database queries easier to write than the Django
174174
ORM in most cases. There is [an entire page on SQLAlchemy](/sqlalchemy.html)
175175
that you should read if you want to learn more about using the library.
176176

177177

178-
### Peewee
178+
### Peewee ORM
179179
[Peewee](https://peewee.readthedocs.org/en/latest/) is a Python ORM
180180
implementation that is written to be
181181
"[simpler, smaller and more hackable](http://charlesleifer.com/blog/the-case-for-peewee-small-hackable-and-fun/)"
@@ -188,7 +188,7 @@ information on the Python ORM implementation.
188188
open source, under the Apache 2.0 license.
189189

190190

191-
### SQLObject
191+
### SQLObject ORM
192192
[SQLObject](http://sqlobject.org/) is an ORM that has been under active
193193
open source development since
194194
[before 2003](http://sqlobject.org/News1.html#sqlobject-0-5).

transform_book.py

Lines changed: 94 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
BASE_DIR = './tempcontent/pages/'
77
BASE_FSP = "https://www.fullstackpython.com/"
88

9-
links = {"/introduction.html":
9+
links = {# chapter 1
10+
"/introduction.html":
1011
"#introduction",
1112
"/learning-programming.html":
1213
"#learning-programming",
@@ -29,6 +30,7 @@
2930
"/best-python-podcasts.html":
3031
"#best-python-podcasts",
3132

33+
# chapter 2
3234
"/development-environments.html":
3335
"#development-environments",
3436
"/vim.html":
@@ -37,15 +39,78 @@
3739
"#emacs",
3840
"/sublime-text.html":
3941
"#sublime-text",
42+
"/pycharm.html":
43+
"#pycharm",
44+
"/jupyter-notebook.html":
45+
"#jupyter-notebook",
46+
"/shells.html":
47+
"#shells",
48+
"/bourne-again-shell-bash.html":
49+
"#bourne-again-shell-bash",
50+
"/zsh-shell.html":
51+
"#zsh",
52+
"/powershell.html":
53+
"#powershell",
54+
"/terminal-multiplexers.html":
55+
"#terminal-multiplexers",
56+
"/tmux.html":
57+
"#tmux",
58+
"/screen.html":
59+
"#screen",
60+
"/pymux.html":
61+
"#pymux",
62+
"/environment-configuration.html":
63+
"#environment-configuration",
64+
"/application-dependencies.html":
65+
"#application-dependencies",
66+
"/virtual-environments-virtualenvs-venvs.html":
67+
"#virtual-environments-virtualenvs",
68+
"/environment-variables.html":
69+
"#environment-variables",
70+
"/localhost-tunnels.html":
71+
"#localhost-tunnels",
72+
"/source-control.html":
73+
"#source-control",
74+
"/git.html":
75+
"#git",
76+
"/mercurial.html":
77+
"#mercurial",
78+
"/apache-subversion.html":
79+
"#apache-subversion",
80+
"/hosted-source-control-services.html":
81+
"#hosted-source-control-services",
82+
"/github.html":
83+
"#github",
84+
"/bitbucket.html":
85+
"#bitbucket",
86+
"/gitlab.html":
87+
"#gitlab",
88+
89+
# chapter 3
90+
"/data.html":
91+
"#data",
92+
"/databases.html":
93+
"#relational-databases",
94+
"/no-sql-datastore.html":
95+
"#nosql-data-stores",
96+
"/object-relational-mappers-orms.html":
97+
"#object-relational-mappers-orms",
98+
"/postgresql.html":
99+
"#postgresql",
100+
"/mysql.html":
101+
"#mysql",
102+
"/sqlite.html":
103+
"#sqlite",
40104

105+
# chapter 4
41106
"/web-development.html":
42-
"../04-web-development/01-web-development.markdown",
107+
"#web-development",
43108
"/web-frameworks.html":
44-
"../04-web-development/02-web-frameworks.markdown",
109+
"#web-frameworks",
45110
"/django.html":
46-
"../04-web-development/03-django.markdown",
111+
"#django",
47112
"/flask.html":
48-
"../04-web-development/04-flask.markdown",
113+
"#flask",
49114
"/bottle.html":
50115
"../04-web-development/05-bottle.markdown",
51116
"/pyramid.html":
@@ -70,29 +135,24 @@
70135
"../04-web-development/16-static-site-generator.markdown",
71136
"/jinja2.html":
72137
"../04-web-development/17-jinja2.markdown",
73-
74-
"/data.html":
75-
"../05-data/01-data.markdown",
76-
"/databases.html":
77-
"../05-data/02-databases.markdown",
78-
"/no-sql-datastore.html":
79-
"../05-data/03-nosql.markdown",
80-
"/object-relational-mappers-orms.html":
81-
"../05-data/04-object-relational-mappers.markdown",
82-
"/postgresql.html":
83-
"../05-data/05-postgresql.markdown",
84-
"/mysql.html":
85-
"../05-data/06-mysql.markdown",
86-
"/sqlite.html":
87-
"../05-data/07-sqlite.markdown",
88-
138+
"/testing.html":
139+
"../08-testing/01-testing.markdown",
140+
"/unit-testing.html":
141+
"../08-testing/02-unit-testing.markdown",
142+
"/integration-testing.html":
143+
"../08-testing/03-integration-testing.markdown",
144+
"/code-metrics.html":
145+
"../08-testing/05-code-metrics.markdown",
146+
"/debugging.html":
147+
"../08-testing/08-debugging.markdown",
89148
"/application-programming-interfaces.html":
90149
"../06-web-apis/01-application-programming-interfaces.markdown",
91150
"/api-integration.html":
92151
"../06-web-apis/02-api-integration.markdown",
93152
"/api-creation.html":
94153
"../06-web-apis/03-api-creation.markdown",
95154

155+
# chapter 5
96156
"/deployment.html":
97157
"../07-web-app-deployment/01-deployment.markdown",
98158
"/servers.html":
@@ -117,10 +177,6 @@
117177
"../07-web-app-deployment/12-configuration-management.markdown",
118178
"/continuous-integration.html":
119179
"../07-web-app-deployment/13-continuous-integration.markdown",
120-
"/logging.html":
121-
"../07-web-app-deployment/14-logging.markdown",
122-
"/monitoring.html":
123-
"../07-web-app-deployment/15-monitoring.markdown",
124180
"/web-analytics.html":
125181
"../07-web-app-deployment/16-web-analytics.markdown",
126182
"/docker.html":
@@ -129,8 +185,6 @@
129185
"../07-web-app-deployment/18-caching.markdown",
130186
"/microservices.html":
131187
"../07-web-app-deployment/19-microservices.markdown",
132-
"/devops.html":
133-
"../07-web-app-deployment/20-devops.markdown",
134188
"/nginx.html":
135189
"../07-web-app-deployment/21-nginx.markdown",
136190
"/apache-http-server.html":
@@ -140,26 +194,23 @@
140194
"/green-unicorn-gunicorn.html":
141195
"../07-web-app-deployment/24-gunicorn.markdown",
142196

197+
# chapter 6
198+
"/devops.html":
199+
"../07-web-app-deployment/20-devops.markdown",
200+
"/logging.html":
201+
"../07-web-app-deployment/14-logging.markdown",
202+
"/monitoring.html":
203+
"../07-web-app-deployment/15-monitoring.markdown",
143204

144-
"/testing.html":
145-
"../08-testing/01-testing.markdown",
146-
"/unit-testing.html":
147-
"../08-testing/02-unit-testing.markdown",
148-
"/integration-testing.html":
149-
"../08-testing/03-integration-testing.markdown",
150-
"/code-metrics.html":
151-
"../08-testing/05-code-metrics.markdown",
152-
"/debugging.html":
153-
"../08-testing/08-debugging.markdown",
154-
205+
# meta (chapter 7)
155206
"/what-full-stack-means.html":
156-
"../13-meta/01-what-full-stack-means.markdown",
207+
"#what-full-stack-means",
208+
"/about-author.html":
209+
"#about-author",
157210
"/change-log.html":
158-
"../13-meta/02-change-log.markdown",
211+
BASE_FSP + "change-log.html",
159212
"/future-directions.html":
160-
"../13-meta/03-future-directions.markdown",
161-
"/about-author.html":
162-
"../13-meta/04-about-author.markdown",
213+
BASE_FSP + "future-directions.html",
163214

164215
"/email.html":
165216
BASE_FSP + "email.html",

0 commit comments

Comments
 (0)