semvec/pypi-packages huggingface dataset:
hypers-cas 1.1.7
Django Cas SSO Client (inherited from django-cas)
License: MIT
Keywords: django

# cas

[![Code Health](https://landscape.io/github/unistra/django-cas/master/landscape.svg?style=flat)](https://landscape.io/github/unistra/django-cas/master)
   
CAS client for Django.  This is K-State&#39;s fork of the original, which lives at
https://bitbucket.org/cpcc/django-cas/overview.  This fork is actively maintaned and 
includes several new features.

Current version: 0.8.5

https://github.com/kstateome/django-cas


## Install


See the document at Bitbucket

https://bitbucket.org/cpcc/django-cas/overview

## Settings.py for CAS

Add the following to middleware if you want to use CAS::
    
    MIDDLEWARE_CLASSES = (
    'cas.middleware.CASMiddleware',
    )
    

Add these to ``settings.py`` to use the CAS Backend::


    CAS_SERVER_URL = "Your Cas Server"
    CAS_LOGOUT_COMPLETELY = True

To disable CAS authentication for the entire django admin app, you should use the ``CAS_ADMIN_AUTH`` parameter::

    CAS_ADMIN_AUTH = False


The ``CAS_ADMIN_PREFIX`` is deprecated since version 1.1.4 and will be removed in 1.1.5 release.


# Additional Features

This fork contains additional features not found in the original:
*  Proxied Hosts
*  CAS Response Callbacks
*  CAS Gateway
*  Proxy Tickets (From Edmund Crewe) 

## Proxied Hosts

You will need to setup middleware to handle the use of proxies.

Add a setting ``PROXY_DOMAIN`` of the domain you want the client to use.  Then add

    MIDDLEWARE_CLASSES = (
    'cas.middleware.ProxyMiddleware',
    )

This middleware needs to be added before the django ``common`` middleware.


## CAS Response Callbacks

To store data from CAS, create a callback function that accepts the ElementTree object from the
proxyValidate response. There can be multiple callbacks, and they can live anywhere. Define the 
callback(s) in ``settings.py``:

    CAS_RESPONSE_CALLBACKS = (
        'path.to.module.callbackfunction',
        'anotherpath.to.module.callbackfunction2',
    )

and create the functions in ``path/to/module.py``:

    def callbackfunction(tree):
        username = tree[0][0].text

        user, user_created = User.objects.get_or_create(username=username)
        profile, created = user.get_profile()

        profile.email = tree[0][1].text
        profile.position = tree[0][2].text
        profile.save()
        

## CAS Gateway

To use the CAS Gateway feature, first enable it in settings. Trying to use it without explicitly
enabling this setting will raise an ImproperlyConfigured:

    CAS_GATEWAY = True

Then, add the ``gateway`` decorator to a view:

    from cas.decorators import gateway

    @gateway()
    def foo(request):
        #stuff
        return render(request, 'foo/bar.html')


## Custom Forbidden Page

To show a custom forbidden page, set ``CAS_CUSTOM_FORBIDDEN`` to a ``path.to.some_view``.  Otherwise,
a generic ``HttpResponseForbidden`` will be returned.


## Proxy Tickets

This fork also includes Edmund Crewe's proxy ticket patch:
http://code.google.com/r/edmundcrewe-proxypatch/source/browse/django-cas-proxy.patch
tripal 1.9
Tripal API library
License: MIT

Tripal Library
==================

.. image:: https://travis-ci.org/abretaud/python-tripal.svg?branch=master
    :target: https://travis-ci.org/abretaud/python-tripal

.. image:: https://readthedocs.org/projects/python-tripal/badge/?version=latest
    :target: http://python-tripal.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

A Python library for interacting with tripal_home_

.. _tripal_home: http://tripal.info/

History
-------

 - 1.9
    - wait for job completion and get logs

Requirements
------------

The tripal_rest_api_ module needs to be installed on your tripal instance.

.. _tripal_rest_api: http://github.com/abretaud/tripal_rest_api

License
-------

Available under the MIT License
pyhessian2 1.2.1
an implementation for hessian2
License: MIT

pyhessian2 is implemented for serialize and deserialize data in hessian2 protocol.

Usage
-----

    >>> # encoding
    >>> from pyhessian2 import HessianObject, Encoder
    >>> attrs = {
            "name": "xx",
            "age": 20,
        }
    >>> obj = HessianObject("com.xx.person", attrs)
    >>> data = Encoder().encode(obj)
    >>> print "%r" % data


    >>> # decoding
    >>> from pyhessian2 import Decoder
    >>> data = ...  # a hessian bytes data
    >>> obj = Decoder().decoder(data)  # get a Hessianobject instance
    >>> print obj  # print json serialized data
peewee-rest-query 0.1.0
A rest query request args parser for peewee orm.
License: MIT
Keywords: rest,query,no-sql,parser,peewee

peewee-rest-query
===================

A rest query request args parser for peewee orm. like no-sql select style.(/?select=id,name,author{*}&id=gte.20&order=id.desc).

Installing
------------

``pip install peewee-rest-query``

Test
------------

``python setup.py test``

Usage
------------

Usage::

    > from peewee_rest_query import PeeweeQueryBuilder, PeeweeSerializer
    > class School(Model):
        id = PrimaryKeyField()
        name = CharField(max_length=100)

    > class Author(Model):
        id = PrimaryKeyField()
        name = CharField(max_length=50)
        age = IntegerField(default=0)
        school = ForeignKeyField(School)

    > class Book(Model):
        id = PrimaryKeyField()
        name = CharField(max_length=255)
        author = ForeignKeyField(Author)

    > args = {
            'select': 'id,name,author{id,name,school{*}}',
            'id': 'gte.20',
            'author.id': 'in.10,20,30,40,50',
            'order': 'id.desc',
            'page': 1,
            'limit': 5
        }
    > builder = PeeweeQueryBuilder(Book, args)
    > builder.select
    [<class '__main__.School'>, <peewee.PrimaryKeyField object>, <peewee.CharField object>, <peewee.PrimaryKeyField object>, <peewee.CharField object>]
    > build.where
    [<peewee.Expression object>, <peewee.Expression object>]
    > builder.order
    [<peewee.PrimaryKeyField object>]
    > builder.paginate
    (1, 5)
    > builder.build()
    <class '__main__.Book'> SELECT "t3"."id", "t3"."name", "t2"."id", "t2"."name", "t1"."id", "t1"."name" FROM "book" AS t1 INNER JOIN "author" AS t2 ON ("t1"."author_id" = "t2"."id") INNER JOIN "school" AS t3 ON ("t2"."school_id" = "t3"."id") WHERE (("t1"."id" >= ?) AND ("t2"."id" IN (?, ?, ?, ?, ?))) ORDER BY "t1"."id" DESC LIMIT 5 OFFSET 0 [20, 10, 20, 30, 40, 50]


License
----------

MIT

Contacts
----------

Email: huiquanxiong@gmail.com