Skip to main content

codebehind

https://travis-ci.org/michaelhenry/codebehind.svg?branch=master https://img.shields.io/pypi/v/codebehind.svg https://img.shields.io/badge/contact-@michaelhenry119-blue.svg?style=flat

Because i dont want to do the same thing all over again. If you are using Django Rest Framework, then this will might help you.

Features

  • Registration and Login

  • Different Authentication Logic (Basic , Token, HMAC Signature)

  • Basic Helpers

  • Since it use DRF, Browsable Rest API!

Quick start

  1. Add “codebehind” to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
        'codebehind',
        'rest_framework',
    ]
  2. Run python manage.py migrate to create the useful models.

  3. In your *settings.py:

    REST_FRAMEWORK = {
        # Use Django's standard `django.contrib.auth` permissions,
        # or allow read-only access for unauthenticated users.
        'DEFAULT_PERMISSION_CLASSES': (
                'rest_framework.permissions.IsAdminUser',
                'rest_framework.permissions.IsAuthenticated',
        ),
    
        'DEFAULT_AUTHENTICATION_CLASSES': (
           'codebehind.authentication.CodeBehindAuthentication',
           'rest_framework.authentication.BasicAuthentication',
           'rest_framework.authentication.SessionAuthentication',
        ),
    
        'PAGE_SIZE': 20
    }
  4. in urls.py:

    from rest_framework import routers
    from django.conf.urls import include, url
    from codebehind.views import UsersViewSet, GroupViewSet
    
    router = routers.DefaultRouter()
    router.register(r'users', UsersViewSet,'users')
    router.register(r'groups', GroupViewSet,'groups')
    
    urlpatterns += [
        # add this
        url(r'^v1/', include(router.urls)),
    ]

Metadata

Release files for codebehind 1.4.17

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codebehind 1.4.17
File Size Uploaded Provenance
codebehind-1.4.17.tar.gz 6.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for codebehind 1.4.17
File Interpreter ABI Platform
codebehind-1.4.17-py2-none-any.whl Python 2 none any Details

Total release size: 16.4 kB

Release files / codebehind-1.4.17.tar.gz

Download URL codebehind-1.4.17.tar.gz
Size 6.6 kB
Tags Source
SHA-256 checksum
How to use checksums
bd5bd307c1133e154c44bba68eda9aae188d6e9e06bb8be8e60ee09614c3c035
BLAKE2b-256 checksum
How to use checksums
1f51e51f63b29905ea296800c32af995582342f9c05e39f3760adf61f58a6a8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / codebehind-1.4.17-py2-none-any.whl

Download URL codebehind-1.4.17-py2-none-any.whl
Size 9.7 kB
Tags Python 2
SHA-256 checksum
How to use checksums
ed5147c1f377945f2784924fad9cd0794f3932e8246f2ecbcdbcffb6a6c79fd2
BLAKE2b-256 checksum
How to use checksums
6eb9d8cd5006ae553d216d767b58a20f4aa1749b9bbd21206732b014120eaee4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for codebehind 1.4.17

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

1.4.17 This release

2 release files No provenance

0.0.12

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page