Skip to main content

Search in the lid database and return the new version number

Project description

LID Search

Version 0.1.0 Language Python 3.13.2 Poetry

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

lid_search-0.1.2.tar.gz (15.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lid_search-0.1.2-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

Details for the file lid_search-0.1.2.tar.gz.

File metadata

  • Download URL: lid_search-0.1.2.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for lid_search-0.1.2.tar.gz
Algorithm Hash digest
SHA256 10968c6bb4a3ac128a89dd74afa6f213ad066a16271c512aca911b385a401de6
MD5 b2e1af813136561ffeba57b0e1377b8d
BLAKE2b-256 3beb436cdef618cb3217b79d3191bad30fcb469cc15bacd64881a5814b30c16a

See more details on using hashes here.

File details

Details for the file lid_search-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: lid_search-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.4 CPython/3.13.7 Darwin/24.6.0

File hashes

Hashes for lid_search-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9b8e8d8332f03d80a4c07464115c3d42b8dd0baf837da5bcf0e92a6d390ec02d
MD5 0470e1ae506747de0e83797e2c3438c5
BLAKE2b-256 4d34c54e7f53e8c1d1d4f68ccdc7ed3902130f37910afceae4b01b6f3d7ba410

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page