semvec/pypi-packages huggingface dataset:
prettyrecord 0.2
Structures like SQLAlchemy's declarative_base or Django's models in your project!
License: MIT
Keywords: structure model declarative record

******************
prettyrecord
******************

prettyrecord allows you to define your data structures in declarative way,
similar to SQLAlchemy's declarative_base or Django's models. To achieve the goal,
prettyrecord uses Python's descriptor and metaclass mechanisms.

Usage
-----

- to define new structure, subclass Record or derived class and fill with fields, eg.::

    from prettyrecord import Record


    class DummyRecord(Record, some_trait=False):
        field1 = Field(required=True, default_value='')
        field2 = Field(default_value=0)
        field3 = ListField(constraint=lambda value: -5 < value < 5)


    dr = DummyRecord(field1='foo', field3=[-2, 3, 1, 0, 4)
    print(dr.field1)          # shows 'foo'
    print(dr.__some_trait__)  # shows 'False'

- to define new field, subclass Field, RecordField, ListField or derived class, eg.::

    from prettyrecord import Field


    class Integer(Field):
        def normalize(self, value):
            value = super(Integer, self).normalize(value)
            return int(value)

- to change creation process of your structures, subclass MetaRecord and define new base class for them, eg.::

    from prettyrecord.record import Record, MetaRecord


    class MetaMyRecord(MetaRecord):
        def __new__(mcs, name, bases, attrs, **kwargs):
            # your code here - remember to call super().__new__

        def __init__(cls, name, bases, attrs, **kwargs):
            # your code here - remember to call super().__init__


    class MyRecord(Record, metaclass=MetaMyRecord):
        pass
django-bnr-exchangerate 0.1.0
A django application to help with exchangerates from bnr.ro
License: MIT
Keywords: exchangerate,bnr

# django-bnr-exchangerate
A django application that handles the updating and supplying of an exchange rate.
## Instalation
```
pip install django-bnr-exchangerate
```
Add to settings.py
```
    'bnr_exchangerate',
```
## Example usage
Get an exchange rate for a value for a certain day.
If the day is on saturday or on sunday it will automatically get the friday exchange rate
```
from bnr_exchangerate.models import ExchangeRate
value = ExchangeRate.get_rate('EUR', '2015-10-10')
```
To import the history from 2005 to current year into the database execute the following command
```
./manage.py get_history
```
To update daily exchange rate run the following command
```
./manage.py get_daily
```
paysafecard 0.2.4
A paysafecard class to help with classic payment api.
License: MIT
Keywords: paysafecard payment class

Paysafecard-python
==================

A class that implements the classic payment function of http://www.paysafecard.com

================================
## Instalation:
```
pip install paysafecard
```
## Example usage
Create the disposition and if it is successfull then redirect to the url.
```
from paysafecard.main import PaySafeCard
paysafe = PaySafeCard(username="", password="", debug=True, test=True)
paysafe.set_field('currency', 'EUR')
paysafe.set_field('amount', '10.00')
paysafe.set_field('mtid', 'transaction-id')
paysafe.set_field('merchantclientid', 'user-id')
paysafe.set_field('mid', 'currency-id')
paysafe.set_field('clientIp', '192.168.0.1')
paysafe.set_field('okUrl', '')
paysafe.set_field('nokUrl', '')
paysafe.set_field('pnUrl', '')
if paysafe.create_disposition():
    redirect_url = paysafe.get_url()
else:
    return False
```
After the client enters the required information you may have 2 cases one on the pnurl other to the okurl this function ensures that the amount was taken from paysafe to your account.
```
from paysafecard.main import PaySafeCard
paysafe = PaySafeCard(username='', password='', debug=True, test=True)
paysafe.set_field('amount', '10.00')
response = paysafe.get_serial_numbers('currency-id', 'EUR')
if response:
    if response == 'execute':
        if paysafe.execute_debit('10.00'):
            return True
        else:
            return False
    else:
        return False
else:
    return False
```
pystackalytics 0.1.3
Python wrapper for Mirantis Stackalytics API.
License: MIT
Keywords: pystackalytics

===============================
pystackalytics
===============================

.. image:: https://img.shields.io/travis/vu3jej/pystackalytics.svg
        :target: https://travis-ci.org/vu3jej/pystackalytics

.. image:: https://img.shields.io/pypi/v/pystackalytics.svg
        :target: https://pypi.python.org/pypi/pystackalytics


Python wrapper for Mirantis Stackalytics API.

* Free software: The MIT License
* Documentation: https://pystackalytics.readthedocs.org.

Usage
-----

.. code:: python

        from pystackalytics import Stackalytics
        api = Stackalytics()
        api.companies(release='kilo').stats[1].name
        # u'Mirantis'
        
All methods support common set of parameters that allow to filter resulting data.

.. csv-table::
    :header: "Parameter", "Description"
    :widths: 20, 50

    "release", "Name of OpenStack release or ‘all’, by default current release"
    "project_type", "Type of project, by default ‘openstack’"
    "module", "Name of module (repository name)"
    "company", "Company name"
    "user_id", "Launchpad id of user or email if no Launchpad id is mapped."
    "metric", "Metric: e.g. ‘commits’, ‘loc’, ‘marks’, ‘emails’"
    "start_date", "When the period starts"
    "end_date", "When the period ends"

Features
--------

* TODO




History
-------

0.1.0 (2015-10-14)
---------------------

* First release on PyPI.
GrindStone 0.4
Helping you put your nose to the GrindStone since 2015.
License: MIT
Keywords: todo grindstone tasks lists

THIS PACKAGE ONLY WORKS WHEN INSTALLED WITH `pip3`
Due to a JSON error the package does not work when installed wth normal `pip`.

##Usage

Installation
```
$ pip3 install --user GrindStone
```

**NOTE:** This package only works when you install it with pip3


Initialize a grindstone (you can have many)
```
$ grindstone init .
Grindstone Created at /path/to/current/working/dir
```

Add tasks
```
$ grindstone add a_task which I really need to get done
$ grindstone add another_task that might be less important
$ grindstone
[a_task] which I really need to get done
$ grindstone list
[a_task] which I really need to get done
[another_task] that might be less important
```

Prioritize tasks
```
$ grindstone prioritize another_task
$ grindstone list
[another_task] that might be less important
[a_task] which I really need to get done
```

Remove tasks
```
$ grindstone remove a_task
$ grindstone list
[another_task] that might be less important
$ grindstone pop
$ grindstone list
```

Help menu
```
$ grindstone help
GrindStone: Keeping you on task since 2015.
Usage:
   grindstone [top]
       Prints the top task on the grindstone
   grindstone init <path>
       Initializes a .grindstone in the <path> directory
   grindstone add <task_name> <description of task>
       Adds a task to the closest .grindstone
   grindstone remove <task_name>
       Removes the specified task with <task_name>
   grindstone prioritize <task_name>
       Move a given task to the top of the grindstone
   grindstone pop
       Removes the top task on the grindstone
   grindstone list
       Lists all tasks on the grindstone
   grindstone help
       Prints this help message
```

And that's pretty much it.

##License

GrindStone is licensed under the MIT license

Copyright © 2015 Elijah Caine M. Voigt
django-editos 1.5
Django app to manage and display editos
License: MIT
Keywords: django,editos,carousel

django-editos
=============

|Build status|

Django app to manage and display editos

Requires
--------

**1.5**

- Django >= 1.8

**<= 1.4.1**

- Django >= 1.6 <= 1.8

Install
-------

Using PyPI

.. code-block:: text

    pip install django-editos

From source

.. code-block:: text

    python setup.py install

Testing
-------

Preparing test env

.. code-block:: text

    virtualenv ./virtualenv
    source virtualenv/bin/activate
    pip install django>=1.8

Runing unit tests

.. code-block:: text

    python setup.py test

Configuring
-----------

Add ``geelweb.django.editos`` to ``INSTALLED_APPS`` in your settings.

Create the db with ``python manage.py migrate editos``

Load the editos tags in your templates with ``{% load editos %}``

Edito model
-----------

Fields
^^^^^^

``editos.models.Edito`` object have the following fields

**title**

Required. 100 characters or fewer.

**link**

Required. Url to redirect

**button_label**

Optional. 20 characters or fewer.

**image**

Required. Uploaded image.

**text_content**

Required. 400 characters or fewer.

**display_from**

Required. A date field to represent the date from which the item is active.

**display_until**

Required. A date field to represent the date by which the item is active.

**active**

Optional. Default to True. Define if the item is active.

**text_theme**

Required. A theme to apply to the item in the template rendering. Can be "light" or "dark". text_theme field use EDITOS_THEMES_ and EDITOS_DEFAULT_THEME_ settings.

Template tags
-------------

**editos**

Render the editos. Example

.. code-block:: text

    {% editos path/to/a/template.html %}

The first argument is the path to a template to use to render the editos. If
omited the default ``editos/carousel.html`` template is used.

Templates
---------

**editos/carousel.html**

The default template. Render a `Bootstrap 3 Carousel <http://getbootstrap.com/javascript/#carousel>`_

Write custom templates
----------------------

The editos will be assign to the template in the ``editos`` variable. Example

.. code-block:: text

    {% for edito in editos %}
      {{ edito.title }}
    {% endfor %}

Settings
--------

.. _EDITOS_THEMES:

**EDITOS_THEMES**

Default

.. code-block:: text

    (
    ('light', 'Light'),
    ('dark', 'Dark'),
    )

A tuple of (value, label) choices

.. _EDITOS_DEFAULT_THEME:

**EDITOS_DEFAULT_THEME**

Default: "light"

The default theme to use

**EDITOS_HELP_TEXTS**

Default: {}

This sets the mapping of help text to model field. Example

.. code-block:: text

    EDITOS_HELP_TEXTS = {
        'image': '150 x 300px',
    }

License
-------

django-editos is released under MIT License. See LICENSE.txt file for details.

.. |Build status| image:: https://travis-ci.org/geelweb/django-editos.svg?branch=master
texter 0.4
Send text messages using SMS gateways
License: MIT
Keywords: sms,text,texting

Texter
======

Send text messages using your Gmail account and `SMS
gateways <https://en.wikipedia.org/wiki/SMS_gateway>`__

Setup
-----

First, install this package with pip:

::

    $ pip install texter

Then, set some environment variables so texter can send mail from your
Gmail account:

::

    $ export GMAIL_EMAIL=<email>
    $ export GMAIL_PASSWORD=<password>

Usage
-----

.. code:: python

    from texter import send_message

    send_message('1234567890', 'verizon', 'Hello from texter.')

There is also a standalone script you can use:

::

    $ ./send_message 1234567890 verizon "Hello from texter."
markdown-magic 1.1.2
A Python-Markdown plugin for creating memes and finding the best-fitting gifs for your posts.
License: MIT
Keywords: markdown,markup,memes,gifs,plugin

==================================
Markdown-Magic for Python-Markdown
==================================

A `Python-Markdown`_ plugin for autocreating memes and finding
the best-fitting gifs for your posts.

**Why?**

In most blogging platforms, putting memes or gifs in your posts is a bit
of a bother. You have to manually search for them, download/generate them, 
then upload them back, or search and paste the url.

This Markdown extension was created to make this process simpler, 
less time-consuming, and more fun!

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

Install it using pip::

    $ pip install markdown-magic


Usage
-----

**For memes**

Simply do :code:`[magic] meme: top_text | bottom_text [/magic]`
for whichever meme template you want to use, and markdown-magic
will detect which template to use on its own.

The markdown-magic currently supports the following meme templates:

* Lord of the Rings Boromir - "One does not simply"
* The Most Interesting Man in the World - "I don't always... when I do"
* Ancient Aliens History Channel Guy
* Grumpy Cat
* Buzz Lightyear and Woody from Toy Story - "X, X everywhere"
* Futurama Fry - "Not sure if..."
* Y U NO Guy
* Ned Stark from Game of Thrones - "Brace yourself/yourselves..."
* X all the Y
* Bill Lumburgh from Office Space - "...that would be great"
* The rent is too damn high
* The Big Lebowski - "Am I the only one around here..."
* Matrix Morpheus - "What if I told you..."
* Ain't nobody got time for that
* Heath Ledger Joker - "Nobody bats an eye... everyone loses their minds"

More to be added soon!

**For gifs**

Just type in :code:`[magic] gif: <list of space-separated search parameters> [/magic]`
and markdown-magic will search and use the appropriate gif
according to the given search parameters.

Here's an example on the Python interpreter::

    >>> import markdown
    >>> text = """
    ... [magic] meme: rains | y u no happen during summers [/magic]
    ... Some text here.
    ... [magic] gif: spongebob squarepants [/magic]
    ... """
    >>> print(markdown.markdown(text, extensions=['magic']))
    <p><img alt="meme: rains | y u no happen during summers " src="http://i.imgflip.com/sytk1.jpg" title="meme: rains | y u no happen during summers " />
    Some text here.
    <img alt="gif: spongebob squarepants " src="http://media4.giphy.com/media/acEFQYr6ljKDu/200.gif" title="gif: spongebob squarepants " /></p>


Todo
----

* Expand list of supported memes 
* Find a way to search for xkcd comics and other webcomics efficiently using keywords
* Find more cool things to implement in the [magic] tag


Copyright
---------

Copyright 2015 Radhika Ghosal, all rights reserved.

This software is released under the MIT license.


.. _Python-Markdown: https://github.com/waylan/Python-Markdown
django-sticky-files 0.3.2
Application to make Django file fields save their values between page reloads
License: MIT
Keywords: django sticky_files

Django-sticky-files
===================

An application that solves a problem, when you need to save
form's file field values between page reloads
(including form validation errors).


Currently in development.

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

Install an application::

    pip install django-sticky-files


Then add ``sticky_files`` to ``INSTALLED_APPS``.

Include urls::

    url(r'^sticky-images/', include('sticky_files.urls', namespace='sticky_files')),


Usage
-----

There are four model fields that implement sticky files behaviour::


    from django.db import models
    from sticky_files import fields
    from sticky_files.models import FileBase


    class SomeImage(FileBase):
        pass


    class SomeFile(FileBase):
        pass

    class SomeModel(models.Model):
        main_image = fields.StickyImageField(
            'app.SomeImage',
            related_name='+'
        )
        images = fields.ManyStickyImageField(
            'app.SomeImage',
            max_objects=4,
            related_name='galleries_images',
        )
        file = fields.StickyFileField(
            'app.SomeFile',
            related_name='+'
        )
        files = fields.ManyStickyFileField(
            'app.SomeFile',
            max_objects=4,
            related_name='galleries_files',
        )


It looks like this:

.. image:: https://github.com/asyncee/django-sticky-files/raw/master/screenshots/intro.png
    :target: https://github.com/asyncee/django-sticky-files/raw/master/screenshots/intro.png


Project is in development, so there are no documentation and tests **yet**.