Search in the lid database and return the new version number
Project description
LID Search
Is a library to manage the version number of the PDS4 products coming from space missions.
Installation
Using pip
To install the library using pip you can use the following command:
python3 -m pip install -U pip
python3 -m pip install lid_search
Using poetry
The library could be added to the poetry project using the command:
poetry add lid_serach
Usage
Database initialization
To initialize the database you can use the following instructions:
>>> from lid_search import LidDB
>>> db = LidDB(jFile='input/data.json',temporary_folder='tmp',cache=False)
where:
- jFile is the database in JSON format
- temporary_folder is the folder where will be stored the temporary SQLite3 database. The default is ./tmp
- cache is a boolean flag and is used to eable the use a cache version of the database.
Database interrogation
Now You can search the current version od the the lid using the search.
>>> lid="urn:esa:psa:bc_mpo_simbio-sys:data_raw:sim_raw_sc_hric_cust0_internal_cruise_ico11_2024-04-08_001"
>>> info=db.search()
The output is a semantic_version_tools class and the next version value could be obtained adding 1:
>>> info
0.1
>>> info += 1
>>> info
0.2
Database closing
To close the database you can use the instructions:
>>> db.close(preserve=False)
The keyword preserve is a bool that enable the preservation of the SQLite database, that could be recalled with the option cache in the database initialization.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lid_search-0.4.0.tar.gz.
File metadata
- Download URL: lid_search-0.4.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.13.7 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c0355a270fc009db193bb5039f44c074dfe925134ee8560ed680f8aefce6845
|
|
| MD5 |
249e40c96bd8ec24d852ad59238d7b45
|
|
| BLAKE2b-256 |
60112a147fdb3d0b917b3c46c5ff32ea1c44da5c4b66ba3583a8d6b5b7b7b17e
|
File details
Details for the file lid_search-0.4.0-py3-none-any.whl.
File metadata
- Download URL: lid_search-0.4.0-py3-none-any.whl
- Upload date:
- Size: 16.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.3.2 CPython/3.13.7 Darwin/25.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06705cd78a95529a78cbf8c57c668cecbec952a228940d6f8afa1fc22c813665
|
|
| MD5 |
14c240bc2a6d7af0dd2079a312393c11
|
|
| BLAKE2b-256 |
f8effde7baa07db392d2342c2e27c870399a1de752c438ef58ffbd32dda7bd67
|