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.
Simple package to store json data more easily !
No server and simple use !
from noserver_database import Database
database = Database('database-name', debug=True) # init noserver_database | debug on True will show errors but no raise them
# Create table
database.create_table('table-name')
# Get table
table = database.get_table('table-name')
# or
table = database > 'table-name'
# Add documents
table.insert_one({'message': 'hello world', 'author': 'armand@camponovo.xyz'})
# Find documents
documents = table.find({'query': 'value'}) # search in all documents and return a list of documents that have the key 'query' at the value 'value'
document = table.find_one({'query': 'value'}) # search in all documents and return the documents that have the key 'query' at the value 'value'
all_docs = table.find({}) # get all documents
# Delete documents
# for a simple doc:
document.delete()
# for a list of docs:
for to_delete_document in documents:
# to_delete_document.delete()
...
create_table(self, name: str)
create a table
get_table(self, name: str)
get a database.table.Table() object
__gt__(self, name: str)
get a database.table.Table() object
raw_json_data(self)
get a list off all documents (in json) in the table
insert_one(self, doc: dict)
insert a document in the table
find_one(self, doc: dict)
return a database.document.Document() object that have the values of doc equal to the values of the returned document
find(self, doc: dict)
return a list of database.document.Document() object that have the values of doc equal to the values of the returned documents
__getitem__(self)
return the item of the dict asked
__del__(self)
delete the document (this will return an error if you try document['item'] after that)
FAQs
Simple package to store JSON data more easily
We found that noserver-database 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.