![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
`json-db-lite` - это простой Python класс для управления JSON файлом в качестве базы данных. Он позволяет инициализировать, читать, добавлять, обновлять и удалять записи в JSON файле.
Вы можете установить пакет через pip:
pip install --upgrade json_db_lite
Пример простого использования класса JSONDatabase:
from json_db_lite import JSONDatabase
db_client = JSONDatabase('small_db.json')
def add_data_to_db():
# массовое добавление
db_client.add_records([{"id": 1, "name": "Sara"},
{"id": 2, "name": "Mark"},
{"id": 3, "name": "Charlie"},
{"id": 4, "name": "David"}
])
# добавление одной записи
db_client.add_records({"id": 5, "name": "Alex"})
def get_all_data():
# возвращаем все данные
return db_client.get_all_records()
def get_data(key='id', value=4):
# возвращаем данные по ключу
return db_client.find_records_by_key(key, value)
def update_data():
# обновляем данные по ключу у одного словаря
db_client.update_record_by_key(upd_filter={"id": 4}, new_data=[{"name": "Alex"}, {"age": 31}])
# обновляем данные по ключу у одного словаря
db_client.update_record_by_key(upd_filter={"name": "Alex"},
new_data=[{"age": 40}, {"job": "python developer"}])
def dell_data():
# удаляем данные по ключу
db_client.delete_record_by_key(key="name", value="Alex")
def dell_all_data():
db_client.clear_database()
Этот проект лицензируется по лицензии MIT.
FAQs
A simple JSON file database manager
We found that json-db-lite demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.