semvec/pypi-packages huggingface dataset:
django-rest-jwt 0.1.46
simple JWT handling for django REST Framework
Requires Python: >=3.6

# drf-jwt
JSON Web Token based authentication using Django REST Framework,
the JWT `encoded in base64` is put in the headers:

> `Authorization: Bearer <token>`


### install:

pip install django-rest-jwt


### let JWT do the authentification:

add 'drf_jwt.authentication.JSONWebTokenAuthentication' in authentication classes:
```python
'DEFAULT_AUTHENTICATION_CLASSES': [
    'drf_jwt.authentication.JSONWebTokenAuthentication',
]
```

### make endpoints to login and get the JWT:
```python
from drf_jwt.controllers import Auth

urlpatterns = [
    path('api/login', Auth.as_view()),
]
```

#### suport GET and POST

##### POST:

> { login, password }

login will be the username of the `authenticate` function of django


##### GET:

return a JWT token if you are authenticate

so, one could do a Basic Authentication to the GET endpoints to receve a JWT
yunyun 0.2.2
A library to help people make decisions.

# YUNYUN

A library to help people make decisions.

## Install

```
pip install yunyun
```

## Usage

```
yunyun
```

Enter as prompted, for example:

```
Start yunyun.
What's the theme of this discussion: Cat or Dog
Creating new record.
What's the objects to compare (separated by comma): cat,dog
What's the features to compare (separated by comma): cute,useful
For cute, how much weight do you think? Choose from -2, -1, 0, 1, 2: 2
For useful, how much weight do you think? Choose from -2, -1, 0, 1, 2: 1
For cute, what's the score of cat? Choose from 0, 1, 2: 2
For cute, what's the score of dog? Choose from 0, 1, 2: 1
For useful, what's the score of cat? Choose from 0, 1, 2: 0
For useful, what's the score of dog? Choose from 0, 1, 2: 1
Save complete. Start processing data...
Processing complete. Please see the results.

Theme: Cat or Dog

Options      cute(2)    useful(1)    Final score(Sorted)
---------  ---------  -----------  ---------------------
cat                2            0                      4
dog                1            1                      3
```
iso19119-nl-parser 0.0.1
PDOK service metadata (ISO19119) paraser

# pdok-service-md-extractor

Converts (geo) service metadata documents (ISO 19119) to JSON. For now specifically targets "Nederlands metadata profiel op ISO 19119 voor services 1.2" metadata documents. 

## Dependencies

See `requirements.txt`. 

## Usage

```
convert-metadata example/19119_1.2_atom.xml
```
EasyVisitors 0.1.0
A simple counter to keep a record of number of visitors who visit your website.
Requires Python: >=3.6

# EasyVisitors

[![made-with-python](https://img.shields.io/badge/Made%20with-Python-1f425f.svg)](https://www.python.org/) 
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/Django)
![GitHub last commit](https://img.shields.io/github/last-commit/deekshant-w/EasyVisitor)
[![PyPI version fury.io](https://badge.fury.io/py/ansicolortags.svg)](https://pypi.org/project/EasyVisitors/) 
[![GitHub issues](https://img.shields.io/github/issues/deekshant-w/EasyVisitor)](https://github.com/deekshant-w/EasyVisitor/issues)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/EasyVisitors)
[![PyPI license](https://img.shields.io/pypi/l/ansicolortags.svg)](https://pypi.python.org/pypi/ansicolortags/) 

EasyVisitors is a simple to use Django App that counts website visitors and displays them without any hassles. It uses cookies to keep a track of how many people visited you website and doesnot increments simply upon a refresh unlike other simple counters. 

  - Easy to use
  - Easy to setup
  - Easy to configure
  - Easy to customize


## Installation
Installation is same for virtualenv and non virtualenv (because it is that simple XD)
```
> pip install EasyVisitors
```
## Configration
In `settings.py` of your django project -
```python
INSTALLED_APPS = [
    ...
    'EasyVisitors',
    ...
]
```

```python
MIDDLEWARE = [
    ...
    'EasyVisitors.middleware.VisitorCounterMiddleware',
    ...
]
```
## Getting Started
It is a local counter so it is necessary to create some space for recording it's values in the database. But no worries all of it has been taken care off. You just have to run - 
```python
> python manage.py makemigrations EasyVisitors
```
```python
> python manage.py migrate EasyVisitors
```
This will create a simple table to store the values of the counter in the database. This step is very important as without these migrations the app wont be able to run as it wont be able to store it's values and hence will show an error.

## Using the app
This simple to configure app is also simple to use. To use the value of counter in your templates - 
```html
{{ request.visitors }}
```
And to use it anywhere else - 
```python
request.visitors
```
## Customization

In `settings.py` of your django project you can customize some aspects of EasyVisitors app -
1. EASY_COUNTER_VISITOR_ALIVE_TIME - It determines how long a visitor is concidered as a unit and after that time, that user is concidered as a new vsitor.
Datatype : *int*  
Unit : *seconds*  
Default: *300*  
&nbsp;
2. EASY_COUNTER_IGNORED_PATHS - List comprising of all paths, which donot alter the state of the counter upon being visited.  
Datatype : *list*  
Default: *['/admin']*  
&nbsp;
2. EASY_COUNTER_RESET - Value for the counter to begin from upon next refresh of any page. If it has any value except `None` then the counter will stay at that value forever untill changed to `None` after which it begins counting from that value.  
Datatype : *int*  
Default: `None`  
OnChange : *Counter stay at the changed value*  
&nbsp;
## Creator
Deekshant Wadhwa
## License
MIT
jsontemplates 0.1.0
A small python module for populating json template files.
Requires Python: >=3.5

# json-templates

A small python module for populating json template files.

### Version 0.1.0

Accepts either a json string or a file path and a dictionary. json-template replaces the place holders found in the json with those found in the dictionary.

Below is a template example

```json
{
  "key":"hard coded value",
  "key2":1,
  "key3":"{{ variable }}",
  "key4":"{% array %}"
}
```

Currently supports `{{ variable }}` for single replacement and `{% array %}` for iterable replacement.

For example given the following dictionary
```python
{
  "variable":"hello world",
  "array":["foo","bar"]
}
```

The JSON would become

```json
{
  "key":"hard coded value",
  "key2":1,
  "key3":"hello world",
  "key4":["foo","bar"]
}
```
### Usage

```python
import JsonTemplates

json_tmp = JsonTemplates()
result = json_tmp.load("template.json")

if result[0]:
  new_dict = json_tmp.generate({"variable":"hello world","array":["foo","bar"]})
```

### Methods

- **load(json_file_path)** - Loads a JSON file  
Returns a tuple (Success,error message or dictionary)

- **loads(json_str)** - Loads a JSON string  
Returns a tuple (Success,error message or dictionary)  

- **generate(replacement_dict)** - Takes in a dictionary of replacement values and generates a new dictionary with the placeholders replaced with the values in the dictionary  
Returns a tuple (Success, error message or dictionary)
qtciutil 0.0.6
Some basic python methods for building CI for qt projects.
Requires Python: >=3.6

# qt-ci-util
Some basic python methods for building CI for qt projects.

## Usage

```
pip install qtciutil
```

Script example:

```python
import qtciutil
# Get Qt Version
qt_version_str = qtciutil.qt_version()
# Build Qt Project
qtciutil.build('/home/l2m2/workspace/xxx/src/xxx.pro', '/home/l2m2/workspace/xxx/build', 'debug')
# Unit Test
qtciutil.unit_test('/home/l2m2/workspace/xxx/test/test.pro', '/home/l2m2/workspace/xxx/build', '/home/l2m2/workspace/xxx/dist')
```

## License
MIT

## Publish to PyPI

```
pip install --user --upgrade setuptools wheel twine
python setup.py sdist bdist_wheel
python -m twine upload dist/*
```

## Reference

- https://juejin.im/post/5d8814adf265da03be491737