semvec/pypi-packages huggingface dataset:
mydb 0.1.2
db wrapper for mysql
License: BSD
Keywords: orm mysql

mydb
================
mydb is a simple db wrapper for mysql.

.. contents::

Install
=================
::

    pip install mydb

Usage
================

Single Connection
--------------------

::


        from mydb.connection import Connection

        db = Connection("mysql://youngking@localhost:13306/mydatabase")
        for article in db.query("SELECT * FROM articles"):
            print article.title


Multiple Connection Like Master/Slave
-----------------------------------------

::

        from mydb.router import ConnectionRouter
        from mydb.proxy import DBProxy
        router = ConnectionRouter(["myapp.somewhere.MasterSlaveRouter"])
        db = DBProxy(router)

        for article in db.query("SELECT * FROM articles"):
            print article.title


Database routers
~~~~~~~~~~~~~~~~~~~

A database Router is a class that provides up to two methods:

db_for_read(statement, \**hints)

::

    Suggest the database that should be used for read operations for ``SELECT`` statement.

    If a database operation is able to provide any additional information that might assist in selecting a database, it will be provided in the hints dictionary. Details on valid hints are provided below.

    Returns None if there is no suggestion.

db_for_write(model, \**hints)

::

    Suggest the database that should be used for writes of statements except ``SELECT``.

    If a database operation is able to provide any additional information that might assist in selecting a database, it will be provided in the hints dictionary. Details on valid hints are provided below.


There is an example in ``tests/test_router.py``.

A router doesn’t have to provide all these methods – it may omit one or more of them. If one of the methods is omitted, 
mydb will skip that router when performing the relevant check.


In ``mydb.router``  there are some default routers, where you can inherit from and overwriten them.


Links
===============================

* `documentation <http://pythonhosted.org/mydb>`_

* `SouceCode at github <https://github.com/youngking/mydb>`_
keychain_manager 0.1.3
A Python API for Mac OS X Keychain, port of https://github.com/jprichardson/keychain_manager
License: BSD
Keywords: keychain_manager

===============================
Keychain Manager
===============================

.. image:: https://badge.fury.io/py/keychain_manager.png
    :target: http://badge.fury.io/py/keychain_manager
    
.. image:: https://pypip.in/d/keychain_manager/badge.png
        :target: https://crate.io/packages/keychain_manager?version=latest

A Python api for Mac OS X Keychain.
It is a port of https://github.com/jprichardson/keychain_manager

* Free software: BSD license

Getting started
---------------

To install the package do:

    .. code-block:: bash

        pip install keychain-manager

Usage
-----

Example of generating Apple Push Certificate

    .. code-block:: python

        from keychain_manager import KeychainManager
        import os.path

        USER = 'youremail@example.com'
        # let's choose a keychain name, so we won't pollute the 'login' keychain
        KEYCHAIN = 'apple_push_keychain'
        # this is where the file aps_production_identity.cer will be downloaded
        YOUR_DOWNLOADS_DIR = os.path.expanduser('~/Downloads/')

        RSA_FILE = '/tmp/myrsa.key'
        KeychainManager.generate_rsa_key(RSA_FILE)

        CERT_FILE = '/tmp/CertificateSigningRequest.certSigningRequest'
        # 'US' is the country abbreviation.
        KeychainManager.generate_cert_request(USER, 'US', RSA_FILE, CERT_FILE)

        kcm = KeychainManager(KEYCHAIN)
        if kcm.exists():
            kcm.delete()
        kcm.create()

        kcm.import_rsa_key(RSA_FILE)

        # now from your browser, you'll have downloaded a file from Apple
        # typically named: aps_production.cer
        kcm.import_apple_cert(os.path.join(YOUR_DOWNLOADS_DIR, 'aps_production.cer'))

        P12_FILE = '/tmp/push_prod.p12'
        kcm.export_identities(P12_FILE)

        PEM_FILE = '/tmp/push_prod.pem'
        KeychainManager.convert_p12_to_pem(P12_FILE, PEM_FILE)

        kcm.delete()

Tests
-----

Tests are running on the Mac OS X only, since we need to have actualy Keychain
Manager. Just clone the repo on your Mac computer and run::

    python setup.py test




History
-------

0.1.0 (2013-09-11)
++++++++++++++++++

* First release on PyPI.
js.jquery_timeago 1.3.0
Fanstatic packaging of jQuery timeago plugin
License: BSD

js.jquery_timeago
*****************

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

This library packages `jQuery timeago plugin`_ for `fanstatic`_.

.. _`fanstatic`: http://fanstatic.org
.. _`jQuery timeago plugin`: http://timeago.yarp.com/

This requires integration between your web framework and ``fanstatic``,
and making sure that the original resources (shipped in the ``resources``
directory in ``js.jquery_timeago``) are published to some URL.


How to use?
===========


You can import ``timeago`` from ``js.jquery_timeago`` and ``need`` it where you want
these resources to be included on a page::

  >>> from js.jquery_timeago import timeago
  >>> timeago.need()


CHANGES
*******

1.3.0
=====

- Initial release.
js.icanhaz 0.10.3
Fanstatic packaging of ICanHaz.js
License: BSD

js.icanhaz
**********

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

This library packages `ICanHaz.js`_ for `fanstatic`_.

.. _`fanstatic`: http://fanstatic.org
.. _`ICanHaz.js`: http://icanhazjs.com/

This requires integration between your web framework and ``fanstatic``,
and making sure that the original resources (shipped in the ``resources``
directory in ``js.icanhaz``) are published to some URL.


How to use?
===========


You can import ``icanhaz`` from ``js.icanhaz`` and ``need`` it where you want
these resources to be included on a page::

  >>> from js.icanhaz import icanhaz
  >>> icanhaz.need()

or::

  >>> from js.icanhaz import icanhaz_no_mustache
  >>> icanhaz_no_mustache.need()

CHANGES
*******

0.10.3
======

- Initial release.