api2db.install package

Submodules

api2db.install.clear_lab module

api2db.install.clear_lab.clab()

This shell command is used to clear a lab.

project_dir-----/
                |
                apis-------/
                |          |- __init__.py
                |          |- FooCollector.py
                |          |- BarCollector.py
                |
                AUTH-------/
                |          |- bigquery_auth_template.json
                |          |- omnisci_auth_template.json
                |          |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                laboratory-/
                |          |- lab.py    EDIT THIS FILE!
                |
                helpers.py
                |
                main.py

Shell Command: path/to/project_dir> clab

project_dir-----/
            |
            apis-----/
            |        |- __init__.py
            |        |- FooCollector.py
            |        |- BarCollector.py
            |
            AUTH-----/
            |        |- bigquery_auth_template.json
            |        |- omnisci_auth_template.json
            |        |- sql_auth_template.json
            |
            CACHE/
            |
            STORE/
            |
            helpers.py
            |
            main.py

api2db.install.collector_add module

Contains the cadd function

api2db.install.collector_add.cadd(ad: str)None

This shell command is used to add a collector to an existing api2db project

Given the following project structure

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py

Shell Command: path/to/procect_dir> cadd BarCollector

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |        |- BarCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py
Parameters

ad – The name of the collector to add.

Returns

None

api2db.install.collector_list module

Contains the clist function

api2db.install.collector_list.clist()None

This shell command is used to show a list of collectors registered with an existing api2db project

Given the following project

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |        |- BarCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py

Shell Command: path/to/procect_dir> clist

Out: ["FooCollector", "BarCollector"]

Returns

None

api2db.install.collector_remove module

Contains the crem function

api2db.install.collector_remove.crem(rem: str)None

This shell command is used to remove a collector registered with an existing api2db project

Given the following project

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |        |- BarCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py

Shell Command: path/to/project_dir> crem BarCollector

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py
Parameters

rem – The name of the collector to remove

Returns

None

api2db.install.make_lab module

api2db.install.make_lab.mlab()

This shell command is used for creation of a lab. Labs offer an easier way to design an ApiForm.

Given a project directory

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |        |- BarCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py

Shell Command: path/to/project_dir> mlab

project_dir-----/
                |
                apis-------/
                |          |- __init__.py
                |          |- FooCollector.py
                |          |- BarCollector.py
                |
                AUTH-------/
                |          |- bigquery_auth_template.json
                |          |- omnisci_auth_template.json
                |          |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                laboratory-/
                |          |- lab.py    EDIT THIS FILE!
                |
                helpers.py
                |
                main.py
Returns

None

api2db.install.project_clear module

Contains the pclear function

Warning

Usage of this will completely clear out the project directory. This includes all collectors, all code, and all files. This is a nuclear delete option for when your foo doesn’t want to bar and so you need to start over. Use with caution.

api2db.install.project_clear.pclear()None

This shell command is used to clear a project and should ONLY be used if a complete restart is required.

Given the following project

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |        |- BarCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py

Shell Command: path/to/project_dir> pclear

project_dir-----/
Returns

None

api2db.install.project_make module

Contains the pmake function

api2db.install.project_make.pmake(apis: Optional[List[str]] = None)None

This shell command is used for initial creation of the project structure.

Given a blank project directory

project_dir-----/

Shell Command: path/to/project_dir> pmake FooCollector BarCollector

project_dir-----/
                |
                apis-----/
                |        |- __init__.py
                |        |- FooCollector.py
                |        |- BarCollector.py
                |
                AUTH-----/
                |        |- bigquery_auth_template.json
                |        |- omnisci_auth_template.json
                |        |- sql_auth_template.json
                |
                CACHE/
                |
                STORE/
                |
                helpers.py
                |
                main.py

Note

This command can also be used without any collector arguments, and collectors can be added using the cadd shell command.

Parameters

apis – The collector names that should be created for the project APIs

Returns

None

api2db.install.run_lab module

api2db.install.run_lab.rlab()

This shell command is used to run a lab.

Module contents

Original Author

Tristen Harr

Creation Date

04/28/2021

Revisions

None