K.E.V. (Keys, Extras, and Values) is a Python ORM for key-value stores based on Valley. Currently supported backends are Redis, S3, and a S3/Redis hybrid backend. Based on Valley.

capless, updated 🕥 2022-09-20 23:52:32

alt text

kev

K.E.V. (Keys, Extra Stuff, and Values) is a Python ORM for key-value stores and document databases based on Valley. Currently supported backends are Redis, S3 and a S3/Redis hybrid backend.

Build Status

Python Versions

Kev should work on Python 3.5+ and higher

Install

pip install kev

Example Project Using KEV

Example Usage

Setup the Connection

Example: loading.py ```python from kev.loading import KevHandler

kev_handler = KevHandler({ 's3':{ 'backend':'kev.backends.s3.db.S3DB', 'connection':{ 'bucket':'your-bucket-name' } }, 's3redis':{ 'backend':'kev.backends.s3redis.db.S3RedisDB', 'connection':{ 'bucket':'your-bucket-name', 'indexer':{ 'host':'your.redis.host.com', 'port':6379, } } }, 'redis': { 'backend': 'kev.backends.redis.db.RedisDB', 'connection': { 'host': 'your-redis-host.com', 'port': 6379, } }, }) ```

Setup the Models

Example: models.py ```python from kev import (Document,CharProperty,DateTimeProperty, DateProperty,BooleanProperty,IntegerProperty, FloatProperty) from .loading import kev_handler

class TestDocument(Document): name = CharProperty(required=True,unique=True,min_length=3,max_length=20) last_updated = DateTimeProperty(auto_now=True) date_created = DateProperty(auto_now_add=True) is_active = BooleanProperty(default_value=True,index=True) city = CharProperty(required=False,max_length=50) state = CharProperty(required=True,index=True,max_length=50) no_subscriptions = IntegerProperty(default_value=1,index=True,min_value=1,max_value=20) gpa = FloatProperty()

def __unicode__(self):
    return self.name


class Meta:
    use_db = 's3redis'
    handler = kev_handler

```

Use the model

How to Save a Document

```python

from .models import TestDocument

kevin = TestDocument(name='Kev',is_active=True,no_subscriptions=3,state='NC',gpa=3.25)

kevin.save()

kevin.name 'Kev'

kevin.is_active True

kevin.pk ec640abfd6

kevin.id ec640abfd6

kevin._id 'ec640abfd6:id:s3redis:testdocument' ```

Query Documents

First Save Some More Docs

```python

george = TestDocument(name='George',is_active=True,no_subscriptions=3,gpa=3.25,state='VA')

george.save()

sally = TestDocument(name='Sally',is_active=False,no_subscriptions=6,gpa=3.0,state='VA')

sally.save() ```

Show all Documents

```python

TestDocument.objects().all()

[,,]

TestDocument.objects().all(skip=1)

[,]

TestDocument.objects().all(limit=2)

[,]

```

Get One Document

```python

TestDocument.get('ec640abfd6')

TestDocument.objects().get({'state':'NC'})

```

Filter Documents

```python

TestDocument.objects().filter({'state':'VA'})

[,]

TestDocument.objects().filter({'no_subscriptions':3}) [,]

TestDocument.objects().filter({'no_subscriptions':3,'state':'NC'}) [] ```

Sort Documents

```python

TestDocument.objects().filter({'no_subscriptions':3}).sort_by('name') [, ] TestDocument.objects().filter({'no_subscriptions':3}).sort_by('name', reverse=True) [, ] TestDocument.objects().all().sort_by('gpa') [, , ] TestDocument.objects().all().sort_by('name').sort_by('gpa') [, >, <TestDocument: Kev:ec640abfd6] ```

Chain Filters

The chain filters feature is only available for Redis and S3/Redis backends. ```python

TestDocument.objects().filter({'no_subscriptions':3}).filter({'state':'NC'}) []

```

Wildcard Filters

Wildcard filters currently only work with the Redis and S3/Redis backend. Use prefixes with the S3 backend. ```python

TestDocument.objects().filter({'state':'N*'}) []

```

Prefix Filters

Prefix filters currently only work with the S3 backend. Use wildcard filters with the Redis or S3/Redis backends. ```python

TestDocument.objects().filter({'state':'N'}) [] ```

Backup and Restore

Easily backup or restore your model locally or from S3. The backup method creates a JSON file backup.

Backup

Local Backup

python TestDocument().backup('test-backup.json')

S3 Backup

```python

TestDocument().backup('s3://your-bucket/kev/test-backup.json') ```

Restore

Local Restore

```python

TestDocument().restore('test-backup.json') ```

S3 Restore

```python

TestDocument().restore('s3://your-bucket/kev/test-backup.json') ```

Author

Twitter::@brianjinwright Github: bjinwright

Issues

Bump urllib3 from 1.26.2 to 1.26.5

opened on 2022-09-20 23:52:32 by dependabot[bot]

Bumps urllib3 from 1.26.2 to 1.26.5.

Release notes

Sourced from urllib3's releases.

1.26.5

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Fixed deprecation warnings emitted in Python 3.10.
  • Updated vendored six library to 1.16.0.
  • Improved performance of URL parser when splitting the authority component.

If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

1.26.4

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

1.26.3

:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap

  • Fixed bytes and string comparison issue with headers (Pull #2141)

  • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme (Pull #2107)

If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors

Changelog

Sourced from urllib3's changelog.

1.26.5 (2021-05-26)

  • Fixed deprecation warnings emitted in Python 3.10.
  • Updated vendored six library to 1.16.0.
  • Improved performance of URL parser when splitting the authority component.

1.26.4 (2021-03-15)

  • Changed behavior of the default SSLContext when connecting to HTTPS proxy during HTTPS requests. The default SSLContext now sets check_hostname=True.

1.26.3 (2021-01-26)

  • Fixed bytes and string comparison issue with headers (Pull #2141)

  • Changed ProxySchemeUnknown error message to be more actionable if the user supplies a proxy URL without a scheme. (Pull #2107)

Commits
  • d161647 Release 1.26.5
  • 2d4a3fe Improve performance of sub-authority splitting in URL
  • 2698537 Update vendored six to 1.16.0
  • 07bed79 Fix deprecation warnings for Python 3.10 ssl module
  • d725a9b Add Python 3.10 to GitHub Actions
  • 339ad34 Use pytest==6.2.4 on Python 3.10+
  • f271c9c Apply latest Black formatting
  • 1884878 [1.26] Properly proxy EOF on the SSLTransport test suite
  • a891304 Release 1.26.4
  • 8d65ea1 Merge pull request from GHSA-5phf-pp7p-vc2r
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/capless/kev/network/alerts).

updated github actions file

opened on 2022-09-09 01:33:37 by Zuiluj None

Bump nbconvert from 6.0.7 to 6.5.1

opened on 2022-08-23 18:42:48 by dependabot[bot]

Bumps nbconvert from 6.0.7 to 6.5.1.

Release notes

Sourced from nbconvert's releases.

Release 6.5.1

No release notes provided.

6.5.0

What's Changed

New Contributors

Full Changelog: https://github.com/jupyter/nbconvert/compare/6.4.5...6.5

6.4.3

What's Changed

New Contributors

Full Changelog: https://github.com/jupyter/nbconvert/compare/6.4.2...6.4.3

6.4.0

What's Changed

New Contributors

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/capless/kev/network/alerts).

Bump mistune from 0.8.4 to 2.0.3

opened on 2022-07-29 23:33:33 by dependabot[bot]

Bumps mistune from 0.8.4 to 2.0.3.

Release notes

Sourced from mistune's releases.

Version 2.0.2

Fix escape_url via lepture/mistune#295

Version 2.0.1

Fix XSS for image link syntax.

Version 2.0.0

First release of Mistune v2.

Version 2.0.0 RC1

In this release, we have a Security Fix for harmful links.

Version 2.0.0 Alpha 1

This is the first release of v2. An alpha version for users to have a preview of the new mistune.

Changelog

Sourced from mistune's changelog.

Changelog

Here is the full history of mistune v2.

Version 2.0.4


Released on Jul 15, 2022
  • Fix url plugin in &lt;a&gt; tag
  • Fix * formatting

Version 2.0.3

Released on Jun 27, 2022

  • Fix table plugin
  • Security fix for CVE-2022-34749

Version 2.0.2


Released on Jan 14, 2022

Fix escape_url

Version 2.0.1

Released on Dec 30, 2021

XSS fix for image link syntax.

Version 2.0.0


Released on Dec 5, 2021

This is the first non-alpha release of mistune v2.

Version 2.0.0rc1

Released on Feb 16, 2021

Version 2.0.0a6


</tr></table> 

... (truncated)

Commits
  • 3f422f1 Version bump 2.0.3
  • a6d4321 Fix asteris emphasis regex CVE-2022-34749
  • 5638e46 Merge pull request #307 from jieter/patch-1
  • 0eba471 Fix typo in guide.rst
  • 61e9337 Fix table plugin
  • 76dec68 Add documentation for renderer heading when TOC enabled
  • 799cd11 Version bump 2.0.2
  • babb0cf Merge pull request #295 from dairiki/bug.escape_url
  • fc2cd53 Make mistune.util.escape_url less aggressive
  • 3e8d352 Version bump 2.0.1
  • Additional commits viewable in compare view


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/capless/kev/network/alerts).

Bump notebook from 6.1.6 to 6.4.12

opened on 2022-06-17 00:03:42 by dependabot[bot]

Bumps notebook from 6.1.6 to 6.4.12.

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/capless/kev/network/alerts).

Bump jupyter-server from 1.1.3 to 1.15.4

opened on 2022-03-29 22:19:05 by dependabot[bot]

Bumps jupyter-server from 1.1.3 to 1.15.4.

Release notes

Sourced from jupyter-server's releases.

v1.15.3

1.15.3

(Full Changelog)

Bugs fixed

Maintenance and upkeep improvements

Contributors to this release

(GitHub contributors page for this release)

@​blink1073 | @​codecov-commenter | @​minrk

v1.15.2

1.15.2

(Full Changelog)

Bugs fixed

Maintenance and upkeep improvements

Contributors to this release

(GitHub contributors page for this release)

@​blink1073 | @​minrk | @​Zsailer

v1.15.1

1.15.1

(Full Changelog)

... (truncated)

Changelog

Sourced from jupyter-server's changelog.

Changelog

All notable changes to this project will be documented in this file.

1.15.6

(Full Changelog)

Bugs fixed

  • Missing warning when no authorizer in found ZMQ handlers #744 (@​Zsailer)

Maintenance and upkeep improvements

Contributors to this release

(GitHub contributors page for this release)

@​blink1073 | @​codecov-commenter | @​Zsailer

1.15.5

(Full Changelog)

Bugs fixed

  • Relax type checking on ExtensionApp.serverapp #739 (@​minrk)
  • raise no-authorization warning once and allow disabled authorization #738 (@​Zsailer)

Maintenance and upkeep improvements

Contributors to this release

(GitHub contributors page for this release)

@​blink1073 | @​codecov-commenter | @​minrk | @​Zsailer

1.15.3

(Full Changelog)

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) - `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language - `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language - `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language - `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/capless/kev/network/alerts).
Capless

CAP (Content and Application) platform built on the SAM (serverless application model) model.

GitHub Repository

redis s3 orm