Country-specific Django helpers, to use in Django Rest Framework

Overview

django-rest-localflavor

https://badge.fury.io/py/django-rest-localflavor.png https://travis-ci.org/gilsondev/django-rest-localflavor.png?branch=master http://smallactsmanifesto.org/static/images/smallacts-badge-80x15-blue.png

Country-specific serializers fields, to Django Rest Framework

Documentation (soon)

The full documentation is at https://django-rest-localflavor.readthedocs.org.

Quickstart

Install django-rest-localflavor:

pip install django-rest-localflavor

Then use it in a project:

INSTALLED_APPS = (
    # ...
    'rest_framework',
    'rest_localflavor',
)
Comments
  • Bump djangorestframework from 3.3.3 to 3.9.1 in /requirements

    Bump djangorestframework from 3.3.3 to 3.9.1 in /requirements

    Bumps djangorestframework from 3.3.3 to 3.9.1.

    Release notes

    Sourced from djangorestframework's releases.

    Version 3.9.1

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Verision 3.9.0

    Release announcement: https://www.django-rest-framework.org/community/3.9-announcement/

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Version 3.8.2

    Point release for 3.8.x series

    • Fix read_only + default unique_together validation. #5922
    • authtoken.views import coreapi from rest_framework.compat, not directly. #5921
    • Docs: Add missing argument 'detail' to Route #5920

    Version 3.8.1

    • Use old url_name behavior in route decorators #5915

      For list_route and detail_route maintain the old behavior of url_name, basing it on the url_path instead of the function name.

    Version 3.8

    • Release Announcement

    • 3.8.0 Milestone

    • Breaking Change: Alter read_only plus default behaviour. #5886

      read_only fields will now always be excluded from writable fields.

      Previously read_only fields with a default value would use the default for create and update operations.

      In order to maintain the old behaviour you may need to pass the value of read_only fields when calling save() in the view:

        def perform_create(self, serializer):
            serializer.save(owner=self.request.user)
      

      Alternatively you may override save() or create() or update() on the serialiser as appropriate.

    • Correct allow_null behaviour when required=False #5888

      Without an explicit default, allow_null implies a default of null for outgoing serialisation. Previously such fields were being skipped when read-only or otherwise not required.

      Possible backwards compatibility break if you were relying on such fields being excluded from the outgoing representation. In order to restore the old behaviour you can override data to exclude the field when None.

    ... (truncated)
    Commits
    • 453196e Version 3.9.1 (#6405)
    • 4bb9a3c Fix XSS caused by disabled autoescaping in the default DRF Browsable API view...
    • e3bd4b9 Fix #1811: take limit_choices_to into account with FK (#6371)
    • 9c408b2 Remove reference to deprecated drf-openapi package (#6398)
    • e0ae975 Fix a badly formatted title in docs (#6089)
    • c052a86 compat: (py2) urlparse = urllib.parse (py3) (#6262)
    • a49d744 Fix OpenAPI links (#6382)
    • 0860ef9 Update quickstart to Django 2.0 routing syntax (#6385)
    • 587058e Allow run_validators() to handle non-dict types. (#6365)
    • 0cf18c4 Use Default Version in URLPathVersioning if 'version' Didn't Specified by Cli...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot ignore this [patch|minor|major] version will close this PR and stop Dependabot creating any more for this minor/major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 1
  • Create a new syntax to use br_state choices keeping backward compatibility, also create a new 'uf' module.

    Create a new syntax to use br_state choices keeping backward compatibility, also create a new 'uf' module.

    Create a new syntactic sugar to use br_state choices keeping backward compatibility, also create a new 'uf' module, making it easy to reference it in tests or anywhere else. ex:

    from localflavor.br import uf
    uf.GO
    uf.DF
    [ ...] 
    
    opened by decko 1
  • Bump wheel from 0.24.0 to 0.38.1 in /requirements

    Bump wheel from 0.24.0 to 0.38.1 in /requirements

    Bumps wheel from 0.24.0 to 0.38.1.

    Changelog

    Sourced from wheel's changelog.

    Release Notes

    UNRELEASED

    • Updated vendored packaging to 22.0

    0.38.4 (2022-11-09)

    • Fixed PKG-INFO conversion in bdist_wheel mangling UTF-8 header values in METADATA (PR by Anderson Bravalheri)

    0.38.3 (2022-11-08)

    • Fixed install failure when used with --no-binary, reported on Ubuntu 20.04, by removing setup_requires from setup.cfg

    0.38.2 (2022-11-05)

    • Fixed regression introduced in v0.38.1 which broke parsing of wheel file names with multiple platform tags

    0.38.1 (2022-11-04)

    • Removed install dependency on setuptools
    • The future-proof fix in 0.36.0 for converting PyPy's SOABI into a abi tag was faulty. Fixed so that future changes in the SOABI will not change the tag.

    0.38.0 (2022-10-21)

    • Dropped support for Python < 3.7
    • Updated vendored packaging to 21.3
    • Replaced all uses of distutils with setuptools
    • The handling of license_files (including glob patterns and default values) is now delegated to setuptools>=57.0.0 (#466). The package dependencies were updated to reflect this change.
    • Fixed potential DoS attack via the WHEEL_INFO_RE regular expression
    • Fixed ValueError: ZIP does not support timestamps before 1980 when using SOURCE_DATE_EPOCH=0 or when on-disk timestamps are earlier than 1980-01-01. Such timestamps are now changed to the minimum value before packaging.

    0.37.1 (2021-12-22)

    • Fixed wheel pack duplicating the WHEEL contents when the build number has changed (#415)
    • Fixed parsing of file names containing commas in RECORD (PR by Hood Chatham)

    0.37.0 (2021-08-09)

    • Added official Python 3.10 support
    • Updated vendored packaging library to v20.9

    ... (truncated)

    Commits
    • 6f1608d Created a new release
    • cf8f5ef Moved news item from PR #484 to its proper place
    • 9ec2016 Removed install dependency on setuptools (#483)
    • 747e1f6 Fixed PyPy SOABI parsing (#484)
    • 7627548 [pre-commit.ci] pre-commit autoupdate (#480)
    • 7b9e8e1 Test on Python 3.11 final
    • a04dfef Updated the pypi-publish action
    • 94bb62c Fixed docs not building due to code style changes
    • d635664 Updated the codecov action to the latest version
    • fcb94cd Updated version to match the release
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump djangorestframework from 3.3.3 to 3.11.2 in /requirements

    Bump djangorestframework from 3.3.3 to 3.11.2 in /requirements

    Bumps djangorestframework from 3.3.3 to 3.11.2.

    Release notes

    Sourced from djangorestframework's releases.

    Version 3.9.3

    This is the last Django REST Framework release that will support Python 2. Be sure to upgrade to Python 3 before upgrading to Django REST Framework 3.10.

    • Adjusted the compat check for django-guardian to allow the last guardian version (v1.4.9) compatible with Python 2. #6613

    Version 3.9.2

    See Release Notes for details.

    Version 3.9.1

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Verision 3.9.0

    Release announcement: https://www.django-rest-framework.org/community/3.9-announcement/

    Change Notes: https://www.django-rest-framework.org/community/release-notes/#39x-series

    Version 3.8.2

    Point release for 3.8.x series

    • Fix read_only + default unique_together validation. #5922
    • authtoken.views import coreapi from rest_framework.compat, not directly. #5921
    • Docs: Add missing argument 'detail' to Route #5920

    Version 3.8.1

    • Use old url_name behavior in route decorators #5915

      For list_route and detail_route maintain the old behavior of url_name, basing it on the url_path instead of the function name.

    Version 3.8

    • Release Announcement

    • 3.8.0 Milestone

    • Breaking Change: Alter read_only plus default behaviour. #5886

      read_only fields will now always be excluded from writable fields.

      Previously read_only fields with a default value would use the default for create and update operations.

      In order to maintain the old behaviour you may need to pass the value of read_only fields when calling save() in the view:

        def perform_create(self, serializer):
            serializer.save(owner=self.request.user)
      

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • No matching distribution found

    No matching distribution found

    Hi - I've noticed over the last 2 weeks or so this package seems to not install via pip. When I run:

    pip install django-rest-localflavor

    I get:

    Could not find a version that satisfies the requirement django-rest-localflavor (from versions: )
    No matching distribution found for django-rest-localflavor
    

    Is the package no longer available?

    bug 
    opened by mobleyc 2
  • Update Django Rest Framework

    Update Django Rest Framework

    Update package to django-rest-framework 3.3.3. If use with version, not work because show this error:

     File "/.../rest_localflavor/br/serializers.py", line 12, in <module>
        from rest_framework.compat import MaxLengthValidator, MinLengthValidator
    ImportError: cannot import name 'MaxLengthValidator'
    
    bug enhancement 
    opened by gilsondev 0
Releases(1.2)
Owner
Gilson Filho
Developer and Data Engineer
Gilson Filho
Transparently use webpack with django

Looking for maintainers This repository is unmaintained as I don't have any free time to dedicate to this effort. If you or your organisation are heav

2.4k Dec 24, 2022
A small repository of projects built in my course, REST APIs with Flask and Python.

A small repository of projects built in my course, REST APIs with Flask and Python.

Teclado 1k Jan 05, 2023
Allows simplified Python interaction with Rapid7's InsightIDR REST API.

InsightIDR4Py Allows simplified Python interaction with Rapid7's InsightIDR REST API. InsightIDR4Py allows analysts to query log data from Rapid7 Insi

Micah Babinski 8 Sep 12, 2022
Extensions for Django REST Framework

Extensions for Django REST Framework

aiden 6 Dec 27, 2022
Eazytraining - Simple application to show how to query API from webapp

student-list Eazytraining - Simple application to show how to query API from webapp This repo is a simple application to list student with a webserver

⚡Christophe FREIJANES 2 Nov 15, 2021
Sanic-RESTPlus is an extension for Sanic that adds support for quickly building REST APIs.

Sanic RestPlus Sanic-RESTPlus is an extension for Sanic that adds support for quickly building REST APIs. Sanic-RESTPlus encourages best practices wit

Ashley Sommer 106 Oct 14, 2022
FastAPI framework, high performance, easy to learn, fast to code, ready for production

FastAPI framework, high performance, easy to learn, fast to code, ready for production Documentation: https://fastapi.tiangolo.com Source Code: https:

Sebastián Ramírez 53.1k Jan 06, 2023
Browsable web APIs for Flask.

Flask API Browsable web APIs for Flask. Status: This project is in maintenance mode. The original author (Tom Christie) has shifted his focus to API S

Flask API 1.3k Dec 27, 2022
Country-specific Django helpers, to use in Django Rest Framework

django-rest-localflavor Country-specific serializers fields, to Django Rest Framework Documentation (soon) The full documentation is at https://django

Gilson Filho 19 Aug 30, 2022
BloodDonors: Built using Django REST Framework for the API backend and React for the frontend

BloodDonors By Daniel Yuan, Alex Tian, Aaron Pan, Jennifer Yuan As the pandemic raged, one of the side effects was an urgent shortage of blood donatio

Daniel Yuan 1 Oct 24, 2021
Simplified REST API to get stickers from Snap

Snap Sticker kit REST API Simplified REST API to get stickers from Snap 💻 Instructions Search stickers Request: url = "https://sticker-kit-horizon733

Dishant Gandhi 1 Jan 05, 2022
DRF-extensions is a collection of custom extensions for Django REST Framework

Django REST Framework extensions DRF-extensions is a collection of custom extensions for Django REST Framework Full documentation for project is avail

Gennady Chibisov 1.3k Dec 28, 2022
REST API with Flask. No data persistence.

Flask REST API Python 3.9.7 The Flask experience, without data persistence :D First, to install all dependencies: python -m pip install -r requirement

Luis Quiñones Requelme 1 Dec 15, 2021
Mlflow-rest-client - Python client for MLflow REST API

Python Client for MLflow Python client for MLflow REST API. Features: Minimal de

MTS 35 Dec 23, 2022
Key-Value база данных на Tarantool и REST API к ней.

KVmail Key-Value база данных на Tarantool и REST API к ней. Документация к API доступна здесь. Requiremrnts ubuntu 16.04+ python3.6+ supervisord nginx

1 Jun 16, 2021
One package to access multiple different data sources through their respective API platforms.

BESTLab Platform One package to access multiple different data sources through their respective API platforms. Usage HOBO Platform See hobo_example.py

Wei 1 Nov 16, 2021
Scaffold django rest apis like a champion 🚀

scaffold django rest apis like a champion 🚀

Abdenasser Elidrissi 133 Jan 05, 2023
Django-rest-auth provides a set of REST API endpoints for Authentication and Registration

This app makes it extremely easy to build Django powered SPA's (Single Page App) or Mobile apps exposing all registration and authentication related functionality as CBV's (Class Base View) and REST

Tivix 2.4k Dec 29, 2022
Estudo e desenvolvimento de uma API REST

Estudo e desenvolvimento de uma API REST 🧑‍💻 Tecnologias Esse projeto utilizará as seguintes tecnologias: Git Python Flask DBeaver Vscode SQLite 🎯

Deusimar 7 May 30, 2022