semvec/pypi-packages huggingface dataset:
django-rest-captcha-fork 0.2.0
Lightweight version of django-simple-captcha for work with django-rest-framework
License: MIT
Requires Python: >=3.6

# Django rest captcha

Lightweight version of `django-simple-captcha` for work with `django-rest-framework`.


## Features

- Speed: use `cache` instead of database
- Safety: union methods for generate key and image. (You can't generate many images for one key)
- Easy: only one rest api (for generate, refresh image).


## Usage
Add `RestCaptchaSerializer` to your protected request validator:
```
from rest_captcha serializer import RestCaptchaSerializer
class HumanOnlyDataSerializer(RestCaptchaSerializer):
    pass
```
This code add to your serializer two required fields (captcha_key, captcha_value)


For provide this fields client(js code) should generate key:
```
> curl -X POST http:localhost:8000/api/captcha/ | python -m json.tool
{
    'image_type': 'image/png',
    'image_decode': 'base64',
    'captcha_key': 'de67e7f3-72d9-42d8-9677-ea381610363d',
    'captcha_value': '... image encoded in base64'
}
```
`captcha_value` - is base64 encoded PNG image, client should decode and show this image to human for validation and send letters from captcha to protected api.
If human have mistake - client should re generate your image.

**Note:** See also [trottling](https://www.django-rest-framework.org/api-guide/throttling/) for protect public api


## Install
```
> pip install django-rest-captcha
```

### Add to your settings.py
Add to installed apps:
```
INSTALLED_APPS = (
    ...
    'rest_captcha',
)
```

Set rest_captcha settings (if you want), see defaults:
```
REST_CAPTCHA = {
    'CAPTCHA_CACHE': 'default',
    'CAPTCHA_TIMEOUT': 300,  # 5 minutes
    'CAPTCHA_LENGTH': 4,
    'CAPTCHA_FONT_SIZE': 22,
    'CAPTCHA_IMAGE_SIZE': (90, 40),
    'CAPTCHA_LETTER_ROTATION': (-35, 35),
    'CAPTCHA_FOREGROUND_COLOR': '#001100',
    'CAPTCHA_BACKGROUND_COLOR': '#ffffff',
    'CAPTCHA_FONT_PATH': FONT_PATH,
    'CAPTCHA_CACHE_KEY': 'rest_captcha_{key}.{version}',
    'FILTER_FUNCTION': 'rest_captcha.captcha.filter_default',
    'NOISE_FUNCTION': 'rest_captcha.captcha.noise_default'
}
```

We recommend using redis or local memory as cache with set parameter, with bigger value of MAX_ENTRIES:
```
CACHES={
    'default': {
        'BACKEND': 'django.core.cache.backends.locmem.LocMemCache',
        'LOCATION': 'rest-captcha',
        'MAX_ENTRIES': 10000,
    }
}
```

### Add hooks to your app router (urls.py):
```
urlpatterns = [
    ...
    url(r'api/captcha/', include('rest_captcha.urls')),
]
```
Flask-SPYC-Login 0.0.0
SPYC-Login Python Backend SDK
License: MIT

#Initialization

login = SPYCLogin()
login.init_app(app)




#Set login_handler

@SPYCLogin.session_controller
def set_user(identity=None):
    if not identity:
        email = 'visitor@unknown.com'
        role = 'public'
    if identity:
        email = identity['email']
        role = identity['role']
    session['email'] = email
    session['role'] = role
    session['login'] = email.endswith('@school.pyc.edu.hk')




#Login Usage

https://localhost/login?redirect=https://frontend.com



#Required Env

SPYC_LOGIN_URL = XXXXX



# Remarks

1. Must have index endpoint for default redirect
2. session_controller must define session['login'] = boolean
data-inventory-tool 0.1.5
Extracts data structure from various sources.
License: MIT
Requires Python: >=3.8,<4.0

Data inventory tool
###################

With this tool you can inspect various data sources and generate data
inventory tables. Data inventory table essentially contains list of tables
and table columns of a specified data source.

Inventory tables are designed to be easily readable and editable using a
spreadsheet program.

Here is an example how you can generate inventory table from a CSV file::

    inventory-table inspect cvs data.cvs


How to install
==============

In order to install this tool, first you need to install Python_. When you
have Python installed, then install data inventory tool like this::

    pip install data-inventory-tool

.. _Python: https://www.python.org/downloads/


Generating inventory table
==========================

PostgreSQL
----------

For PostgreSQL first you need to install PostgreSQL driver::

    pip install psycopg2-binary

Then generate inventory table like this::

    inventory-table inspect sql postgresql://user:password@host:port/db

MySQL
-----

For MySQL first you need to install MySQL driver::

    pip install mysqlclient

Then generate inventory table like this::

    inventory-table inspect sql mysql+mysqldb://user:password@host:port/db


Troubleshooting
===============

If you get errors like this::

    Error: Database driver not found: No module named 'psycopg2'.
    See: https://docs.sqlalchemy.org/en/13/dialects/index.html

That means, you don't have a required database driver installed.
flowws-analysis 0.7.0
Stage-based scientific workflows for system analysis
License: MIT
Requires Python: >=3

[![ReadTheDocs](https://img.shields.io/readthedocs/flowws-analysis.svg?style=flat)](https://flowws-analysis.readthedocs.io/en/latest/)

# Introduction

`flowws-analysis` is an in-development set of
[flowws](https://flowws.readthedocs.io) modules to create reusable
analysis pipelines for scientific simulations. Although it is
currently mostly useful for analyzing structures found in molecular
simulation (together with
[flowws-freud](https://github.com/klarh/flowws-freud)), the framework
can be used as a base for analysis and visualization in jupyter
notebooks or a standalone GUI for other application domains.

## Installation

Install `flowws-analysis` from PyPI (note that most modules require
dependencies; use the second `pip install` command below to install
those) :

```
# this installs flowws-analysis without any prerequisites
pip install flowws-analysis

# optional prerequisites can be installed via extras, for example:
pip install flowws-analysis[garnett,gtar,notebook,plato,pyriodic,qt]
```

Alternatively, install from source:

```
pip install git+https://github.com/klarh/flowws-analysis.git#egg=flowws-analysis
```

## Examples

Consult the
[flowws-examples](https://github.com/klarh/flowws-examples) project
for examples using `flowws-analysis` modules.

## API Documentation

Browse more detailed documentation
[online](https://flowws-analysis.readthedocs.io) or build the sphinx
documentation from source:

```
git clone https://github.com/klarh/flowws-analysis
cd flowws-analysis/doc
pip install -r requirements.txt
make html
```