The Ook Catalog
Description
OokCatalog is a very simple data catalog made for PostgreSQL. It’s been programmed with the philosophy of being maintained and/or modified by geomaticians / database administrator and not by web developers. Therefore, it makes the simplest use of Python code and SQL requests, and is mostly powered by the SQL comments you have already defined, so it can easily be understood.
Also, it’ll work directly on the database to be catalogued, but will create very few items on it. Only a user, one table and an enum.
Based on Flask, Psycopg, and Bulma.
Features
Features of this project are based on my work needs
- Displaying tables and views accessible by your users
- A page for each table, including:
- A longer description
- A full list of the columns and their comment
- Months of the year when the data is updated
- Full text search through table and column names and descriptions
- Command-line interface for some administration of the catalog, including getting the list of table updates coming
These might come later :
- Correctly handle 404 when a table doesn’t exist
- Warning the administrators of the incoming updates
- A script to automatically add new tables in
public.ookcatalog, and eventually to remove no-longer existing ones. - Editing long description and months of update through a web based interface
Sreenshots
Installation
See INSTALLATION for detailed installation instructions.
Usage
Launching OokCatalog
See INSTALLATION for instructions on configuring and launching OokCatalog. Note that the environment variable is also needed to use command-line commands.
As a user
Going to the home page of OokCatalog will grant you with the full list of schemas and their corresponding tables of your database.
You can clik on any table to go to a full page dedicated to it. You will be displayed a few lignes of description. Your administrators can put any information they think is useful in there. Below, you’ll find a list of every field (or column) in this table and a short description.
At the very bottom of the page is a list of the months when this table is updated along the year.
In the top right corner of the page, you’ll find a search button, next to a text entry. You can enter any text you want for your search, and press enter or click the button to launch the research. OokCatalog will search in the table name, table short and long description, and all the columns name and description. It’ll give more importance to table name, and less to the columns. The search results are ordered by supposed pertinence, and limited to 20 results.
As an administrator
You can modify the long description and update months in your new table public.ookcatalog. To add your existing tables
to it, see the next section and the command-line interface. You can also manually add the tables you want to describe,
for example if you don’t have access to the server command-line, by correctly entering table_schema and table_name
so it matches existing tables.
To enter update_months, you need to use the textual array syntax, for example: '{Janvier, Mars, Septembre}'. You need
to single quote the whole array and not individual months. Be wary that this is case-sensitive (Janvier != janvier).
Command-line interface
OokCatalog packs a command-line interface for useful commands. Running ookcatalog without any argument will display a
list of the available commands.
ookcatalog tables-missing-comments
This command displays the list of all tables where description isn’t complete. It looks for table comment, column
comments, and for OokCatalog specific descriptions (in public.catalog), so long description and update months.
You can set up a cron task that would regularly check for missing descriptions and email you for details, or simply lanch the command when needed.
ookcatalog tables-updating
This command displays the list of tables that should update this month, based on what you inputted
in public.ookcatalog.update_months. It’ll also add:
- If launched between the 1st and 10th day of the month, the updates of the last month
- If launched between the 21st and the last day of the month, the updates coming the next month
I advise to set up a regular cron job that will warn you of updates (this being the goal of this command). You don’t need to have it run everyday, but it could be on the first, 15th and 25th day of each month.
ookcatalog update-tables-catalog
This command will update the public.ookcatalog, filling it with the tables that weren’t already inserted. It’ll
correctly input table_schema and table_name fields.
You should launch this command first after having installed OokCatalog, so you can start writing long descriptions and filling update months. After that, you only need to launch it after adding new tables to your database.
Contributing
Contributing is welcomed even though I haven’t prepared a contribution workflow for now.
A few things to know:
- By contributing, you accept to publish your code under the MIT license
- I use Black default formatting
I haven’t set up a translation tool yet. If you wish to translate OokCatalog, and don’t know how to do it with the source code and pybabel, please contact me so I can make it as easy as possible for you.
Metadata
Release files for ookcatalog 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ookcatalog-0.2.2.tar.gz | 16.3 kB | Without provenance | Details for ookcatalog-0.2.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ookcatalog-0.2.2-py3-none-any.whl | Python 3 | none | any | Details for ookcatalog-0.2.2-py3-none-any.whl |
Total release size: 33.3 kB
Release files / ookcatalog-0.2.2.tar.gz
| Download URL | ookcatalog-0.2.2.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
44af7e96ce45e1f1254f449805914856449df5565ded4d17ca11881128e0a0b4
|
|
BLAKE2b-256 checksum How to use checksums |
ade916d42ae43c804d0ecbdef269cc4ed3c4cacad31745fa04391b3d29a43b7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Release files / ookcatalog-0.2.2-py3-none-any.whl
| Download URL | ookcatalog-0.2.2-py3-none-any.whl |
|---|---|
| Size | 17.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
49f933b95d971c5aabeddaf80a40aa2c8b758414831b5e9122e05f7dc9a951e1
|
|
BLAKE2b-256 checksum How to use checksums |
c9909479984b56aad7d6953bbddf6b51287a00249be7c7fb2abda42abfec5392
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.11.8
|
Security for ookcatalog 0.2.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.