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.2.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.2.0-py3-none-any.whl (16.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lid_search-0.2.0.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.2.0.tar.gz
Algorithm Hash digest
SHA256 3e6f837cbd1cd8b7eb3d6c303512b8270e3ee492ab447210dd4fabf42d2d26a0
MD5 4f421f23a4b2d7f3bb8a290b11b921df
BLAKE2b-256 26b51f6aae29338a9942cb936fe156d8921f33fec9136f041dfe44a790c86e29

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lid_search-0.2.0-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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 354506cbcc116568d4ca326520126de0172b6af52a2cd01de38bbb63070b1504
MD5 1e06bfdb420de32e40681f3707cf9d51
BLAKE2b-256 ddaa196e694ad1ea9e8ff8d372478f2d71f3bf73170432531b580c323decfe0d

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