1
0
mirror of https://github.com/ilri/dspace-statistics-api.git synced 2024-06-26 08:03:47 +02:00
dspace-statistics-api/dspace_statistics_api
Alan Orth 4dbf734a4b
Move all imports to top of file
A few months ago I had an issue setting up mocking because I was
trying to be clever importing these libraries only when I needed
them rather than at the global scope. Someone pointed out to me
that if the imports are at the top of the file Falcon will load
them once when the WSGI server starts, whereas if they are in the
on_get() or on_post() they will load for every request! Also, it
seems that PEP8 recommends keeping imports at the top of the file
anyways, so I will just do that.

Imports sorted with isort.

See: https://www.python.org/dev/peps/pep-0008/#imports
2020-12-18 22:42:06 +02:00
..
docs Update docs about POST /items 2020-12-13 20:09:20 +02:00
__init__.py Refactor project structure 2018-10-28 11:14:21 +02:00
app.py Move all imports to top of file 2020-12-18 22:42:06 +02:00
config.py Format code with black 2019-11-27 12:30:06 +02:00
database.py dspace_statistics_api: Use f-strings instead of format() 2020-03-02 11:24:29 +02:00
indexer.py dspace_statistics_api/indexer.py: Use fl parameter 2020-12-18 10:44:02 +02:00
items.py Move all imports to top of file 2020-12-18 22:42:06 +02:00
util.py Move all imports to top of file 2020-12-18 22:42:06 +02:00