semvec/pypi-packages huggingface dataset:
datetime_truncate 1.1.0
Truncate datetime objects to a set level of precision
License: BSD

==================
datetime_truncate
==================

This module truncates a datetime object to the level of precision that
you specify, making everything higher than that zero (or one for day
and month).

It is based on PostgreSQL's DATE_TRUNC_.

Documentation available on `Read the Docs`_.

Installation:
-------------

You can install from pypi!

.. code-block::

    pip install datetime_truncate


Usage:
------

.. code-block::

    >>> from datetime_truncate import truncate
    >>> truncate(datetime(2012, 2, 4, 12, 24, 50, 234), 'second')
    datetime(2012, 2, 4, 12, 24, 50)
    >>> truncate(datetime(2012, 2, 4, 12, 24, 50), 'minute')
    datetime(2012, 2, 4, 12, 24)
    >>> truncate(datetime(2012, 2, 4, 12, 24, 50), '5_minute')
    datetime(2012, 2, 4, 12, 20)
    >>> truncate(datetime(2012, 2, 4, 12, 24, 50), '19_minute')
    datetime(2012, 2, 4, 12, 19)
    >>> truncate(datetime(2012, 2, 4, 12, 24), 'hour')
    datetime(2012, 2, 4, 12)
    >>> truncate(datetime(2012, 2, 4, 12, 24), 'day')
    datetime(2012, 2, 4)
    >>> truncate(datetime(2012, 2, 4, 12, 24), 'week')
    datetime(2012, 1, 30)
    >>> truncate(datetime(2012, 2, 4, 12, 24), 'month')
    datetime(2012, 2, 1)
    >>> truncate(datetime(2012, 2, 4, 12, 24), 'quarter')
    datetime(2012, 1, 1)
    >>> truncate(datetime(2012, 8, 18, 12, 25), 'half_year')
    datetime(2012, 7, 1)
    >>> truncate(datetime(2012, 8, 18, 12, 25), 'year')
    datetime(2012, 1, 1)

There are also sugar functions available on the form:

* `truncate_second`
* `truncate_minute`
* `truncate_nth_minute`
* `truncate_hour`
* `truncate_day`
* `truncate_week`
* `truncate_month`
* `truncate_quarter`
* `truncate_half_year`
* `truncate_year`

Changes
=======

`1.1.0`_ - 2017-10-19
---------------------

* Added truncate to nth minute of the hour, so if you want to
  truncate to every third minute you do: `truncate(dt, '3_minute')` or
  with some more sugar on top; `truncate_nth_minute(dt, 3)`
* Fixed bugs with truncate quarter and half_year, thanks `@thegrymek`_!

.. _1.1.0: https://github.com/gaqzi/datetime_truncate/compare/1.0.1...1.1.0
.. _@thegrymek: https://github.com/thegrymek

.. _DATE_TRUNC: http://www.postgresql.org/docs/9.1/static/functions-datetime.html#FUNCTIONS-DATETIME-TRUNC
.. _Read the Docs: http://datetime_truncate.readthedocs.org/en/latest/
backstage-oauth2 0.1.3
App de integração com o login do backstage
License: BSD
Keywords: backstage_oauth2

===============================
Backstage OAuth2
===============================

Introduction
============

- Inclua no seu requirements
- Inclua o código no seu urls.py
```python
from backstage_oauth2.views import BackstageOAuthRedirect
# admin.site.login deve vir depois do admin.autodiscover()
admin.site.login = BackstageOAuthRedirect.as_view(provider='backstage')
urlpatterns += patterns(
        '',
        url(r'^accounts/', include('backstage_oauth2.urls')),
)
```

- Adicione no INSTALLED_APPS:
```
    'allaccess',
    'backstage_oauth2'
```

- No settings, adicionar no AUTHENTICATION_BACKENDS:
```python
    AUTHENTICATION_BACKENDS = [
        'allaccess.backends.AuthorizedServiceBackend',
        'django.contrib.auth.backends.ModelBackend',
    ]
```

- Crie um arquivo json para o provider backstage. Ex de dev:
```json
    [
        {
            "pk": 1,
            "model": "allaccess.provider",
            "fields": {
                "name": "backstage",
                "authorization_url": "https://accounts.backstage.dev.globoi.com/authorize",
                "secret": "SEU SECRET",
                "access_token_url": "https://accounts.backstage.dev.globoi.com/token",
                "key": "SEU KEY",
                "request_token_url": "",
                "profile_url": "https://accounts.backstage.dev.globoi.com/user"
            }
        }
    ]
```

- Carregue o json
```
    ./manage.py loaddata caminho/para/seu/arquivo.json
```

* Free software: BSD license

Features
--------

* TODO
- Fazer integração com a barra do backstage





History
-------
0.1.1 (2017-10-18)
---------------------

* Procura usuário por email e username ao invés de ser somente pelo username.


0.1.1 (2017-10-11)
---------------------

* First release on PyPI.