semvec/pypi-packages huggingface dataset:
bysondb 0.1.1
A simple BSON database written in Python
License: MIT
Requires Python: >=3.9,<4.0
Keywords: bson,database,python

# BysonDB

A serverless key-value and document based database using BSON.

## What the heck is BSON?

BSON is short for **Binary JavaScript Object Notation**. It is the binary encoding of JSON, created by MongoDB, and is used in their database. Unlike JSON, it was *actually made for* the storage of data. It is faster, and allows for more datatypes, such as dates and bytes, that JSON does not allow. You can read more about it's purpose, and it's similarities and differences to JSON [here](https://bsonspec.org/).

## Usage:

### Installation:
```bash
pip install bysondb
```

### Key -> Value database:
A database just like normal JSON, with each key coresponding to a value 
```py
import datetime
from bysondb import BysonDB

# Create a database with a path to a file. The suffix
# will be changed to .bson, even if there is no suffix
my_db = BysonDB('path/to/database/file.bson')

# Set values like a normal dictionary
my_db["name"] = "John"
my_db["age"] = 30

# Get values in the same way
print(f"My name is {my_db['name']}. I am {my_db['age']} years old.")

# Some objects like datetimes can be used as well
# Not all objects can be serialized
my_db["date"] = datetime.datetime.now()

print(f"Today's date is {my_db['date'].strftime('%x')}")

# Deleting a key. Can't be undone, so be careful.
my_db.remove("test")
```

### Document based database
A database structure similar to MongoDB, with a single collection of objects
```py
from bysondb import BysonDocumentDB

# Creating a database is the same with the BysonDB,
# but using BysonDocumentDB
my_db = BysonDocumentDB('path/to/database/file.bson')

# Insert a single object to the database
person = {
    "name": "John",
    "age": 30
}
my_db.insert_one(person)

# Insert multiuple objects into the database
people = [
    {"name": "Joe"},
    {"name": "Steve"},
    {"key": "value"}
]
my_db.insert_many(people)


# Get objects as dicts from the database using a query

# Get all objects
all_objects = my_db.find({})

# Get an object where the key 'debug' is True
debug_objects = my_db.find({"debug": True})

# Find a maximum of 5 objects where the key 'key' is 'value'
objects = my_db.find({"key": "value"}, limit=5)

# Removing values is like finding them, with a search query and a limit
my_db.remove({"remove": True})
my_db.remove({"random_number": 5}, limit=1})
```

---

This package uses [bson](https://github.com/py-bson/bson), a package for the BSON codec that does not rely on MongoDB.

This package was formatted using [Black](https://black.rtfd.io).
cree-sro-syllabics 2021.7.26
Convert between Western Cree SRO and syllabics
License: MIT

Cree SRO/Syllabics
==================

[![Build Status](https://travis-ci.org/eddieantonio/cree-sro-syllabics.svg?branch=master)](https://travis-ci.org/eddieantonio/cree-sro-syllabics)
[![codecov](https://codecov.io/gh/eddieantonio/cree-sro-syllabics/branch/master/graph/badge.svg)](https://codecov.io/gh/eddieantonio/cree-sro-syllabics)
[![Documentation Status](https://readthedocs.org/projects/crk-orthography/badge/?version=stable)](https://crk-orthography.readthedocs.io/en/stable/?badge=stable)
[![PyPI package](https://img.shields.io/pypi/v/cree-sro-syllabics.svg)](https://pypi.org/project/cree-sro-syllabics/)
[![Calver YYYY.MM.DD](https://img.shields.io/badge/calver-YYYY.MM.DD-22bfda.svg)](http://calver.org/)

Python 3 library to convert between Western Cree **standard Roman
Orthography** (SRO) to **syllabics** and back again!

Can be used for:

 - nêhiyawêwin/ᓀᐦᐃᔭᐍᐏᐣ/Cree Y-dialect
 - nīhithawīwin/ᓃᐦᐃᖬᐑᐏᐣ/Cree Th-dialect
 - nēhinawēwin/ᓀᐦᐃᓇᐍᐏᐣ/Cree N-dialect

Install
-------

Using `pip`:

    pip install cree-sro-syllabics

Or, you can copy-paste or download [`cree_sro_syllabics.py`][download] into
your own Python 3 project!

[download]: https://github.com/eddieantonio/cree-sro-syllabics/raw/master/cree_sro_syllabics.py


Usage
-----

[Visit the full documentation here][documentation]! Wondering about
words like "syllabics", "transliterator", or "orthography"? Visit
[the glossary][glossary]!

[documentation]: https://crk-orthography.readthedocs.io/en/stable/
[glossary]: https://crk-orthography.readthedocs.io/en/stable/glossary.html


Convert SRO to syllabics:

```python
>>> from cree_sro_syllabics import sro2syllabics
>>> sro2syllabics('nêhiyawêwin')
'ᓀᐦᔭᐍᐏᐣ'
>>> sro2syllabics('write nêhiyawêwin')
'write ᓀᐦᐃᔭᐍᐏᐣ'
```

Convert syllabics to SRO:

```python
>>> from cree_sro_syllabics import syllabics2sro
>>> syllabics2sro('ᐊᒋᒧᓯᐢ')
'acimosis'
>>> syllabics2sro(' → ᒪᐢᑫᑯᓯᕽ  ᑎᕒᐁᐩᓬ ')
' → maskêkosihk  tireyl '
```

See also
--------

[nêhiyawêwin syllabics](https://github.com/UAlbertaALTLab/nehiyawewin-syllabics)


License
-------

Copyright © 2018–2021 National Research Council Canada.

Licensed under the MIT license.