semvec/pypi-packages huggingface dataset:
python-gspreaddict 0.1.0
Google spread sheet as dictionary list. read-only.
License: MIT
Keywords: Google spreadsheet,python

~~~~~~~~~~~
gspreaddict
~~~~~~~~~~~

Google spreadsheet as dictionary list. read-only.

Preparation
===========

Google API Console
------------------

Make credentials on Google spreadsheet.

https://console.developers.google.com/apis/dashboard

Credentials -> Create credentials -> Service account key

Download credential as JSON.



Google spreadsheet
------------------

Open google spreadsheet.

Share -> Input email in credential file

xxxxxxxxxxxx@appspot.gserviceaccount.com


Usage
=====

::

    from gspreaddict import GSpreadDict

    class TestRecord(GSpreadDict):
        spreadsheet_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
        credentials_json_path = os.path.join(
            os.path.dirname(__file__), "My Project-xxxxxxxx.json")

spreadsheet_key is in Google spreadsheet URL.

credentials_json_path is downloaded Json credentials path.

Get instances,

::

    record = TestRecord.objects.get(key=value))

::

    record = TestRecord.objects.get(lambda x: x['key'] == value)

Caching
=======

::

    from django.core.cache import caches

    class TestRecord(GSpreadDict):
        spreadsheet_key = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxx'
        credentials_json_path = os.path.join(
            os.path.dirname(__file__), "My Project-xxxxxxxx.json")

    @classmethod
    def cache_set(cls, key, value):
        caches['gspreaddict'].set(key, value)

    @classmethod
    def cache_get(cls, key):
        return caches['gspreaddict'].get(key)

Override cache_set and cache_get classmethods.
Flask-IPInfo 0.0.10
Get IP, ISP, Location, OS from flask request
License: MIT
Keywords: flask ip address browser

Flask-IPInfo
============

This library get some useful information from flask's request object.Such as 
IP Address, ISP, Location, Web Browser, Operating System, etc.

Example
-------

::

    from flask import Flask
    from flask_ipinfo import IPInfop

    app = Flask(__name__)
    ipinfo = IPInfo()

    @app.route("/")
    def hello():
        return "Your IP Address is :" + ipinfo.ipaddress

    if __name__ == "__main__":
        app.run()



Supports
--------
Tested on Python 3.5


* Project:  https://github.com/borisliu/flask-ipinfo
django-onthefly 0.2.1
Change Django Settings On the Fly
License: MIT
Keywords: django,settings,change django settings

# onthefly
Change Django Settings on Custom admin page at "RUNTIME".

# Installation

```bash
pip install django-onthefly
```

# Configuration

##### adminplus configuration (INSTALLED_APPS)

Replace 'django.contrib.admin' with 'django.contrib.admin.apps.SimpleAdminConfig'
Add 'adminplus' after SimpleAdminConfig

```bash
'django.contrib.admin.apps.SimpleAdminConfig',
# ...
'adminplus',
# ...
```

##### onthefly configuration (INSTALLED_APPS)

Add 'onthefly' at the bottom of the list.

##### Final INSTALLED_APPS

```bash
INSTALLED_APPS = (
    'django.contrib.admin.apps.SimpleAdminConfig', (instead of 'django.contrib.admin')
    # ...
    'adminplus',
    # ...
    # ...
    'onthefly'
    )
```

##### You need to change urls.py like below as well

```bash
    # urls.py
    from django.contrib import admin
    from adminplus.sites import AdminSitePlus

    admin.site = AdminSitePlus()
    admin.autodiscover()

    urlpatterns = [
        # ...
        # Include the admin URL conf as normal.
        (r'^admin', include(admin.site.urls)),
        # ...
    ]
```

# Usage
go to django admin panel and see Onthefly Settings on bottom of the page as Custom Views
Add, Delete or Change settings at runtime.


# TODOs
##### 1- Add new backends apart from Redis
##### 2- Exception fallback to prevent unstabilities while changing settings at runtime
##### 3- More if you 'd like to contribute!

# CONTRIBUTE
##### All contributions are very welcomed!

# SCREENSHOT
![ScreenShot](https://raw.github.com/baranbartu/onthefly/master/screenshot.png)