semvec/pypi-packages huggingface dataset:
jira-cache 0.8.3
Dump Jira issues to file and reload them without connection to the original server.
License: MIT
Keywords: jira ticket caching json dump

==========
jira-cache
==========

Dump Jira issues to file and reload them without connection to the original server.

Quickstart
----------

Dump issues::

    from jira import JIRA
    from jira_cache import CachedIssues

    jira = JIRA('https://jira.atlassian.com/')
    result = jira.search_issues('project=JRA and text ~ "Python"')
    cached = CachedIssues(result)
    cached.dump(open('python-issues.json', 'w'))

Loading from file::

    from jira import JIRA
    from jira_cache import CachedIssues

    result = CachedIssues.load(open('python-issues.json'))

Installation
------------

Simply run ::

    pip install jira-history

Contributing
------------

Please do! I would love for this to be developed further by anyone who is interested. Wherever possible, please
provide unit tests for your work (yes, this is very much a 'do as I say, not as I do' kind of moment).
Don't forget to add your name to AUTHORS.

License
-------

Copyright (c) 2016 Sebastian Rahlf

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
tickler 1.0.2a0
A scriptable CLI utility and support library for 'tickler' style file trees
License: MIT
Keywords: tickle tickler cli filesystem week number iso date

Tickler can be used to create a tickler directory structure automatically on the filesystem. It provides a utility function for building tickler compatible file paths from a standard datetime object. This function can also be accessed for scripting purposes by using the --get-path argument and passing a dateutil compatible date string.
morphys 1.0
Smart conversions between unicode and bytes types for common cases
License: MIT
Keywords: string unicode bytes conversion

=======
Morphys
=======

**Morphys** is a simple, small library providing utilities for easy smart
conversions between ``unicode`` and ``bytes`` types.

In Python 2, the treatment of ``unicode`` and ``bytes`` objects is a potential
source of many surprising and annoying errors, should a non-ASCII character
appear anywhere in a string.

The two types are completely equivalent if only ASCII characters are used, and
many libraries treat them as such, while others are more vigilant about which
type they accept. Some can even return one or the other type of string from the
same function depending on the content (for example, the standard library
``json`` module).

**Morphys** is meant to help with cases where types of strings handled by
libraries are inconsistent or undocumented. Or where simply both types of
string can appear, but should be coerced to the same type before being handled.


Conversion functions
====================

**Morphys** provides two functions for smart conversions to ``unicode`` or
``bytes``. They just return their argument unchanged if it's already the right
type and can also convert any object defining the ``__unicode__`` (or
``__str__`` in Python 3) "magic" method.

``ensure_bytes(obj, encoding=None)``
    Return ``obj`` as a ``bytes`` object, if necessary encoding it using
    ``encoding``.

``ensure_unicode(obj, encoding=None)``
    Return ``obj`` as an ``unicode`` object, if necessary decoding it using
    ``encoding``.

See docstrings in the module for more detailed description of the functions.


Lazy conversion wrapper
=======================

In certain cases it may be more convenient to use an object that can be used
both as ``bytes`` or ``unicode`` as needed. The class ``StrMorpher`` is
provided for this case. Its constructor takes the same arguments as the
conversion functions. The object makes calls to the appropriate conversion
function when its "magic" methods that convert to ``bytes`` or ``unicode``
are invoked.

Note, that ``StrMorpher`` is not itself a subclass of any of the string
types and relies on the "magic" methods being called to produce the actual
string objects.

See docstrings in the module for more detailed description of the class.


Default encoding
================

The ``encoding`` parameter is optional in all places where it's accepted. Where
it is left as ``None``, the default encoding is used.

The default encoding is controlled by ``default_encoding`` global
variable in the ``morphys`` module. Initially it's set to "utf-8", but it's
allowed to set it to a different encoding name from user code.


Python 3
========

While **Morphys** is mostly meant to solve issues of string types handling in
Python 2, it's fully compatible with Python 3 and can be used with it.
facebook-sdk-python 0.0.4
Facebook Python SDK
License: MIT

Facebook SDK Python
===================

.. image:: https://travis-ci.org/zetahernandez/facebook-python-sdk.svg?branch=master
    :target: https://travis-ci.org/zetahernandez/facebook-python-sdk
.. image:: https://coveralls.io/repos/github/zetahernandez/facebook-python-sdk/badge.svg
    :target: https://coveralls.io/github/zetahernandez/facebook-python-sdk

Facebook SDK Python is a python based implementation of `Facebook PHP SDK`_

.. contents:: Table of Contents


Installation
============

To install Facebook SDK Python, simply:

.. code-block:: bash

    $ pip install facebook-sdk-python

Usage
=====

Retrieve User Profile
---------------------

.. code-block:: python

    from facebook_sdk.exceptions import FacebookResponseException
    from facebook_sdk.facebook import Facebook

    facebook = Facebook(
        app_id='{app_id}',
        app_secret='{app_secret}',
        default_graph_version='v2.5',
    )

    facebook.set_default_access_token(access_token='{access_token}')

    try:
        response = facebook.get(endpoint='/me?fields=id,name')
    except FacebookResponseException as e:
        print e.message
    else:
        print 'User name: %(name)s' % {'name': response.json_body.get('id')}


Batch Upload Files
------------------

.. code-block:: python

    from facebook_sdk.exceptions import FacebookResponseException
    from facebook_sdk.facebook import Facebook

    facebook = Facebook(
        app_id='{app_id}',
        app_secret='{app_secret}',
    )

    facebook.set_default_access_token(access_token='{access_token}')

    batch = {
        'photo-one': facebook.request(
            endpoint='/me/photos',
            params={
                'message': 'Foo photo.',
                'source': facebook.file_to_upload('path/to/foo.jpg'),
            },
        ),
        'photo-two': facebook.request(
            endpoint='/me/photos',
            params={
                'message': 'Bar photo.',
                'source': facebook.file_to_upload('path/to/bar.jpg'),
            },
        ),
        'photo-three': facebook.request(
            endpoint='/me/photos',
            params={
                'message': 'Other photo.',
                'source': facebook.file_to_upload('path/to/other.jpg'),
            },
        )
    }

    try:
        responses = facebook.send_batch_request(requests=batch)
    except FacebookResponseException as e:
        print e.message


Dependencies
============

Dependencies that to use the application:

* requests_

.. _requests: http://docs.python-requests.org/en/latest/
.. _Facebook PHP SDK: https://developers.facebook.com/docs/reference/php/