semvec/pypi-packages huggingface dataset:
sanic-jwt 1.8.0
JWT oauth flow for Sanic
License: MIT
Keywords: sanic oauth authentication jwt

# Sanic JWT

[![Latest PyPI version](https://img.shields.io/pypi/v/sanic-jwt.svg)](https://pypi.python.org/pypi/sanic-jwt)
[![Python versions](https://img.shields.io/pypi/pyversions/sanic-jwt.svg)](https://pypi.python.org/pypi/sanic-jwt)
[![Version status](https://img.shields.io/pypi/status/sanic-jwt.svg)](https://pypi.python.org/pypi/sanic-jwt)
[![MIT License](https://img.shields.io/pypi/l/sanic-jwt.svg)](https://raw.githubusercontent.com/ahopkins/sanic-jwt/dev/LICENSE)

[![Build Status](https://travis-ci.org/ahopkins/sanic-jwt.svg?branch=master)](https://travis-ci.org/ahopkins/sanic-jwt)
[![Documentation](https://readthedocs.org/projects/sanic-jwt/badge/?version=latest)](http://sanic-jwt.readthedocs.io/en/latest/?badge=latest)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/9727756ffccd45f7bc5ad6292596e03d)](https://www.codacy.com/app/ahopkins/sanic-jwt?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=ahopkins/sanic-jwt&amp;utm_campaign=Badge_Grade)
[![Test Coverage](https://codecov.io/gh/ahopkins/sanic-jwt/branch/dev/graph/badge.svg)](https://codecov.io/gh/ahopkins/sanic-jwt)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)


Sanic JWT adds authentication protection and endpoints to [Sanic].

It is both **easy** to get up and running, and **extensible** for the
developer. It can act to **protect endpoints** and also provide **authentication scoping**, all wrapped into a nice [JWT].

[Read the documentation](http://sanic-jwt.rtfd.io/) | [View the source code](https://github.com/ahopkins/sanic-jwt/)

------

**What do I do?**

It's easy: (1) install, (2) initialize, and (3) authenticate.

**Install:**

```
pip install sanic-jwt
```

  [Sanic]: http://sanic.readthedocs.io
  [JWT]: https://jwt.io

**Initialize:**

```python
from sanic import Sanic
from sanic_jwt import Initialize

def my_authenticate(request, *args, **kwargs):
    ...

app = Sanic()
Initialize(
    app,
    authenticate=my_authenticate
)
```

**Authenticate:**

    http://localhost/auth

------

**Can I customize it?**

Definitely! Sanic JWT is made to allow developers to customize the operation to fit their needs. [Check out the documentation](http://sanic-jwt.rtfd.io/) to learn how.
mongometer 0.1.0
MongoDB aggregation pipeline performance checker
License: MIT
Requires Python: >=3.7,<4.0
Keywords: mongodb,python

## MongoMeter

MongoDB aggregation pipeline performance checker

### Install

```shell
pip install mongometer
```

### Console

#### Example

Input

```shell
mongometer --url="mongodb://test:test@localhost:27017" --db=shop --collection bikes --path agg.json
```

Output

```shell
Processing ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$match     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$set       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$match     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$lookup    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$unwind    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$unwind    ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$project   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$sort      ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$facet     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
$set       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 100% 0:00:00
                 Results                  
┏━━━━┳━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┓
┃    ┃ Name     ┃ Time (seconds)         ┃
┡━━━━╇━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━┩
│ 1  │ $match   │ 1.5710415840148926     │
│ 2  │ $set     │ 0.0                    │
│ 3  │ $match   │ 0.0                    │
│ 4  │ $lookup  │ 0.00015425682067871094 │
│ 5  │ $unwind  │ 0.0014383792877197266  │
│ 6  │ $unwind  │ 0.003248453140258789   │
│ 7  │ $project │ 0.06569337844848633    │
│ 8  │ $sort    │ 3.276400566101074      │
│ 9  │ $facet   │ 0.5028722286224365     │
│ 10 │ $set     │ 0.0                    │
└────┴──────────┴────────────────────────┘

```

#### Parameters

```shell
Usage: mongometer [OPTIONS]

Options:
  --url TEXT         MongoDB connection string  [required]
  --db TEXT          MongoDB database name  [required]
  --collection TEXT  MongoDB collection name  [required]
  --path TEXT        Path to the aggregation pipeline json file  [required]
  --repeat INTEGER   Number of repeats
  --help             Show this message and exit.

```

### Python code

```python
from mongometer import AggregationChecker

URI = "mongodb://test:test@localhost:27017"
DB_NAME = "shop"
COLLECTION_NAME = "bikes"

PIPELINE = [
    {
        "$match": {
            "$text": {"$search": "John"},
        }
    },
    {
        "$sort": {
            "created_at": 1
        }
    }
]

checker = AggregationChecker(URI, DB_NAME, COLLECTION_NAME)
checker.measure(pipeline=PIPELINE).print()
```
invenio-subjects-gnd 2022.6.28
GND subject terms for InvenioRDM
License: MIT
Keywords: invenio inveniordm subjects GND

# invenio-subjects-gnd

GND subject terms for InvenioRDM

Install this extension to get the german subjects authority data ([Gemeinsame Normdaten](http://d-nb.info/gnd/)) into your instance.

## Installation

From your instance directory:

    pipenv install invenio-subjects-gnd

This will add it to your Pipfile.

### Versions

This repository follows [calendar versioning](https://calver.org/):

`2021.06.18` is both a valid semantic version and an indicator of the year-month corresponding to the loaded DDC terms.


## Usage

There are 2 types of users for this package. Maintainers of the package and instance administrators.

### Instance administrators

For instance administrators, after you have installed the extension as per the steps above, you are done. It should just work.

### TODO -- Maintainers

When a new list of DDC term comes out, this package should be updated. Here we show how.

0- Make sure you have cloned this package. Then install it locally with:

    make install

1- Update:

    make update

   This will

   1- Download the new list
   2- Convert terms to InvenioRDM subjects format
   3- Write those to `invenio_subjects_gnd/vocabularies/subjects_gnd.yaml` file

3- Run the tests just to make sure everything is still good:

    make test

4- When you are happy with the list, bump the version in `invenio_subjects_ddc/version.py` and release it.


## Future Ideas

- InvenioRDM doesn't have a way to update pre-existing subjects yet. Once there is one,
  this package should provide the functionality to update DDC terms.


# Changes

Version 2022.01.12 (unreleased)

- Initial release.