Skip to main content
unqlitepy
=============

UnQLite for Python Binding

## Install

```sh
> sudo pip install unqlitepy
...
Successfully installed UnQLitePy
Cleaning up...
```
or

```sh
> virtualenv sample
> cd sample
> bin/pip install git+https://github.com/nobonobo/unqlitepy.git
...
Successfully installed UnQLitePy
Cleaning up...
```

## Usage

```python
from unqlitepy import UnQLite

with UnQLite(':mem:') as db:
db.store('test', 'hello!')
print db.fetch('test') # -> hello!
db.append('test', ' world!')
print db.fetch('test') # -> hello! world!

db.delete('test')
for i in range(25):
db.store('test{0}'.format(i), 'hello!')
db.store('etst{0}'.format(i), 'hello!')
if i%5==0:
db.delete('etst{0}'.format(i))

@UnQLite.FetchCallback
def f(output, outlen, udata):
output = (c_char*outlen).from_address(output).raw
print locals()
return UNQLITE_OK

db.fetch_cb('test0', f)

sample = (
"print 'hello!\n';"
"db_create('users'); /* Create the collection users */"
"db_create('hoges');"
" /* Store something */ "
"db_store('users',{ 'name' : 'dean' , 'age' : 32 });"
"db_store('hoges',{ 'name' : 'dean' , 'age' : 32 });"
"db_store('users',{ 'name' : 'chems' , 'age' : 27 });"
"db_store('hoges',{ 'name' : 'chems' , 'age' : 27 });"
"print db_fetch_all('users')..'\n';"
"/*print db_reset_record_cursor('users')..'\n';*/"
"while( ($rec = db_fetch('users')) != NULL ){"
" print $rec; print '\n';"
"}"
)

with db.compile(sample) as vm:
vm.execute()
with vm.new_scalar() as sv, vm.new_array() as av:
print sv, sv.is_scalar()
print av, av.is_json_array()

db.fetch_cb('users', f)

with db.cursor() as cursor:
cursor.first()
cursor.seek('test20')
while cursor.valid():
print repr(cursor.key()), repr(cursor.value())
cursor.next()
```

Metadata

Release files for unqlitepy 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unqlitepy 0.3.0
File Size Uploaded Provenance Actions
unqlitepy-0.3.0.tar.gz 417.7 kB Without provenance Details for unqlitepy-0.3.0.tar.gz

Release files / unqlitepy-0.3.0.tar.gz

Download URL unqlitepy-0.3.0.tar.gz
Size 417.7 kB
Tags Source
SHA-256 checksum
How to use checksums
64fc61edb9cec6d0c3513a5b3629647bb08a1b5ade887992dfec5ea29180628c
BLAKE2b-256 checksum
How to use checksums
61d685d11dde754edde502f6cf723095cddb0f2157a8bbc1f004afe3e625ea1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for unqlitepy 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page