semvec/pypi-packages huggingface dataset:
yosai-alchemystore 0.3.0.post1
An RDBMS solution for Yosai, featuring a flat RBAC data model
License: Apache License 2.0
Keywords: sqlalchemy rbac yosai

# Yosai AlchemyStore

This is an *extension* project for [Yosai](http://www.github.com/yosaiproject/yosai) that features a complete ``AccountStore`` data store solution intended for quick-start projects using Yosai.

An ``AccountStore`` is a data access object (DAO) that provides an interface to
a datastore, in this case a relational database.  YosaiAlchemyStore is named as such
to indicate its use of the [SQLAlchemy](http://www.sqlalchemy.org) library to enable all RDBMS connectivity.


# Installation

Install YosaiAlchemyStore from PyPI using pip:
    ``pip install yosai_alchemystore``


## Setup

An AlchemyAccountStore can be configured through one of two ways:

* Option 1: YAML Config File
    1. Define a system environment variable, YOSAI_ALCHEMYSTORE_SETTINGS, that points to 
       the location of alchemystore_settings.yaml file and ensure that the file
       permissions make it readable.

    2. Instantiate an AlchemyAccountStore without arguments.  

* Option 2: Passing a dburl argument
    - instantiate an AlchemyAccountStore, passing a "dburl" argument as
      defined by SQLAlchemy:  http://docs.sqlalchemy.org/en/latest/core/engines.html#database-urls


## API

The ``AccountStore`` API consists of two abstract base classes within the ``yosai.core.account.abcs`` module.
It's a simple API, consisting of a request method to obtain Account credentials (passwords)
and a request method to obtain Account authorization information (roles and permissions).


## Data Models

Following is the database schema used to facilitate a simple, "flat" Role Based Access Control (RBAC) authorization policy.  This data model enables the most basic form of RBAC.
![](/doc/db_schema.png)


## Dev Status:  as of v0.0.5

The project has been released after being tested as part of yosai integrated testing.
Unit tests are pending development.
yosai-dpcache 0.3.0
A caching integration for Yosai
License: Apache License 2.0
Keywords: caching yosai


# Yosai DPCache:  "DogPile" Cache Integration

![](/img/cache_bw.png)

This is a Yosai integration using a fork of the dogpile project, authored by Mike Bayer. 

The dogpile project consists of two sub-projects:  ``dogpile.core`` and ``dogpile.cache``.
Yosai_DPCache is a fork of these projects, replacing pickle-based serialization with
serialization supported by Yosai and making a few other customizations.

## Serialization

![](/img/serialization_process.png)

Yosai reduces objects to their serializable form using the ``marshmallow`` library, 
encodes the "reductions" with msgpack, json, or other encoding scheme, and then caches
the objects.  

Objects obtained from cache are de-serialized back into their reduced forms and then 
re-materialized into Yosai objects. 


## Installation

Install YosaiDPCache from PyPI using pip: ``pip install yosai_dpcache``


## Setup

A YosaiDPCache.DPCacheHandler can be configured through one of two ways:

* Option 1: YAML Config File
    1. Define a system environment variable, YOSAI_CACHE_SETTINGS, that points to 
       the location of cache_settings.yaml file and make sure that the file
       permissions make it readable.

    2. Instantiate a DPCacheHandler without arguments.  

* Option 2: instantiate a DPCacheHandler, passing *all* of the required 
            arguments (see cachehandler.py and settings.py for detail)


## Dev Status (as of YosaiDPCache v0.0.5)

### Redis is Ready for Use

Only Redis support has been implemented and ad-hoc tested.

### Unit testing is Pending

Integrated testing of yosai includes YosaiDPCache, and so YosaiDPCache
is included with automated testing.  However, YosaiDPCache needs its own
unit tests covering its customizations.