semvec/pypi-packages huggingface dataset:
xnote 1.1
Easily keep track of your notes on your favorite terminal emulator!
Requires Python: >=3.6, <4
Keywords: command-line,cli,notes,thoughts

# xnote-cli
Easily keep track of your notes on your favorite terminal emulator!

# Installation:

``pip3 install xnote``

## NOTE: Only the prerelease versions work for now. Check out [the release history](https://pypi.org/project/xnote/#history) and download the latest prerelease version.
labml-db 0.0.15
Minimalistic ORM for JSON/YAML/Pickle file based/redis/mongo DB
Keywords: database,json,yaml

.. image:: https://badge.fury.io/py/labml-db.svg
    :target: https://badge.fury.io/py/labml-db
.. image:: https://pepy.tech/badge/labml-db
    :target: https://pepy.tech/project/labml-db

LabML DB
========

LabML DB is a minimalistic ORM database that uses JSON, YAML or Pickle files.
It uses Python typehints as much as possible to help with static checking,
and IDE features like autocompletion.

You can install this package using PIP.

.. code-block:: console

    pip install labml_db


Example
^^^^^^^

.. code-block:: python

    from labml_db import Model, Index


    class Project(Model['Project']):
        name: str
        experiments: int

        @classmethod
        def defaults(cls):
            return dict(name='', experiments=0)


    class User(Model['User']):
        name: str
        projects: List[Key[Project]]
        # This is an optional property, will automatically default to None
        occupation: Optional[str]

        @classmethod
        def defaults(cls):
            # Name is not in defaults and not optional.
            # It will be considered a required property
            return dict(projects=[])


    class UsernameIndex(Index['User']):
        pass

You can configure it to use JSON/YAML/Pickle files

.. code-block:: python

    Model.set_db_drivers([
        FileDbDriver(PickleSerializer(), User, Path('./data/user')),
        FileDbDriver(YamlSerializer(), Project, Path('./data/project'))
    ])
    Index.set_db_drivers([
        FileIndexDbDriver(JsonSerializer(), UsernameIndex, Path('./data/UserNameIndex.yaml'))
    ])

You can user `get_all` and `Key.load` to retrieve models, and `save` to save models.

.. code-block:: python

    proj = Project(name='nlp')
    user = User(name='John')
    user.projects.append(proj.key)
    user.occupation = 'test'
    user.save()
    proj.save()

    keys = User.get_all()
    print([k.load() for k in keys])
    keys = Project.get_all()
    print([k.load() for k in keys])

And index is a hash-map between strings and keys.

.. code-block:: python

    user_key = UsernameIndex.get('John')
    if not user_key:
        user = User(name='John')
        user.save()
        UsernameIndex.set(user.name, user.key)
    else:
        print(user_key.load())
dict-aligned-print 0.1.2
print dict in aligned way
Requires Python: >=3.6

## dict_aligned_print

### print non nested dict in aligned way

```
usage example:
    input:
        from dict_aligned_print import print_dict

        dct = dict(my_key="hi", a=42, b='bb', my_key2=3)
        dct['another key'] = dict(a=4)
        
        print_dict(dct)
    
    output:
             my_key : hi
                  a : 42
                  b : bb
            my_key2 : 3
        another key : {'a': 4}
        --------------------------------------------------
```