Skip to main content

Search in the lid database and return the new version number

Project description

LID Search

Version 0.25.0 Language Python 3.14 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.3.0.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.3.0-py3-none-any.whl (16.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lid_search-0.3.0.tar.gz
  • Upload date:
  • Size: 15.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.3.2 CPython/3.14.3 Darwin/25.3.0

File hashes

Hashes for lid_search-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b1bbff818dd50d3cf1cd7fb611e621cf4c5d9fed7aa9015089a1566519ae18c1
MD5 e85c8a930a473bd6fff573cbab041847
BLAKE2b-256 b5e6d3d7834675c9a41fd36bb8a79154e9fbdf913f3aa5301c83305896913fb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lid_search-0.3.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.14.3 Darwin/25.3.0

File hashes

Hashes for lid_search-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b9bb60850513cdec46c1db9a493e742bdf6c81f369aa20b50eb03783aa6eab0e
MD5 98f7d189853daecbf5db2bfa9be7fccc
BLAKE2b-256 cfd5bf869b1b2c7c3828ecdf603c200f96bd6793528d5dbbd21d505ad96d604b

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