semvec/pypi-packages huggingface dataset:
Flask-DatastoreLogger 0.0.3
A logging interface for Google Cloud Datastore
License: MIT

# Flask-DatastoreLogger

A logging interface for Google Cloud Datastore

## Installation

Add this line to your application's requirements.txt

```python
Flask-DatastoreLogger
```

And then execute:

    $ pip install -r requirements.txt

Or install it yourself as:

    $ pip install Flask-DatastoreLogger

## Usage

Using DatastoreLogger is dead simple. First set your GOOGLE_APPLICATION_CREDENTIALS environment variable to point at a valid JSON creds file.

    $ export GOOGLE_APPLICATION_CREDENTIALS=/path/to/creds.json

The following snippet should get you coding
```python
import logging
from flask import Flask
from DatastoreLogger import DatastoreLog, DatastoreLogHandler
from PubSubDecorator import PubSubDecorator


app = Flask(__name__)
app.pubsub = PubSubDecorator(app)

@app.pubsub.subscribe(
    subscription='run_task'
    topic='task_queue',
    route='/run_task',
    methods=['POST']
)
def run_task(message, *args, **kwargs):
    task_id = message.get('task_id')

    task_logger = logging.getLogger('task_log_{0}'.format(task_id))
    handler = DatastoreLogHandler('task_log', task_id)

    task_logger.addHandler(handler)
    task_logger.setLevel(logging.DEBUG)

    task_logger.info('Starting Task #{0}'.format(task_id))

    # process task actions logging messages with task_logger

    return '', 200


@app.route('/task_log/<int:task_id>', methods=['GET'])
def task_log(task_id):
    log = DatastoreLog('task_log', task_id)
    return log.stream_response()
```

# Testing

    $ pytest -s --show-capture=no tests.py
pyninjas-blog 0.0.2
Simple Blog Application for Django
License: MIT
Keywords: blog,django,pyninjas,simple

pyninjas-blog: Simple Blog Application for Django - WIP
=======================================================

INSTALL
-------

* Using pip: `pip install pyninjas-blog`
* Using source code: `python setup.py install`

Add `pyninjas.blog` to `INSTALLED_APPS`:

.. code-block:: python

    INSTALLED_APPS = [
      # other apps
      'pyninjas.blog',
    ]

Add `pyninjas.blog.urls` to your project's urls:

.. code-block:: python

    urlpatterns = [
      # other urls
      path('blog/', include('pyninjas.blog.urls', namespace='blog')),
    ]

By default pyninjas-blog has all templates needed for the blog.
However it uses simple template for demo. You can enhance it with your current template by rewriting them:



FEATURES
--------

[x] Use of HTML as article format
[] Atom and RSS feeds
[] Preview for blog posts before publishing
[x] slug only tag and article urls
[] OpenGraph meta data
[] Multilevel comments (replies)
[] Loding contents using ajax


License
-------
Copyright (c) 2018 Emin Mastizada and contributors.
MIT License.