<commit_before># Stripe Twisted bindings

[![Build Status](https://travis-ci.org/lextoumbourou/txstripe.svg?branch=master)](https://travis-ci.org/lextoumbourou/txstripe)
[![Coverage Status](https://coveralls.io/repos/lextoumbourou/txstripe/badge.svg?branch=master&service=github)](https://coveralls.io/github/lextoumbourou/txstripe?branch=master)

## Usage

Works exactly like [stripe-python](https://github.com/stripe/stripe-python) except each blocking method returns a [Deferred](http://twistedmatrix.com/documents/current/core/howto/defer.html).

## Examples

### In the REPL

```
$ python -m twisted.conch.stdio
>>> import txstripe
>>> txstripe.api_key = 'ABC123'
>>> txstripe.Customer.all()
<Deferred #0>
Deferred #0 called back: <ListObject list at 0x7f81ddb55eb0> JSON: {
  "data": [
    {
      "account_balance": 0,
      "created": 1441869100,
      "currency": "usd",
      "default_source": "card_123456",
      "delinquent": false,
      "description": "Customer for Bill",
      "discount": null,
      "email": "<EMAIL>",
      "id": "cus_blah",
      "livemode": false,
      "metadata": {},
      "object": "customer",
      "shipping": null,
      "sources": {
       #...
```

### In code

```
from twisted.internet import reactor
from twisted.internet import defer

import txstripe
txstripe.api_key = 'ABC123'
<commit_msg>Use syntax highlighting in README.<commit_after># Stripe Twisted bindings

[![Build Status](https://travis-ci.org/lextoumbourou/txstripe.svg?branch=master)](https://travis-ci.org/lextoumbourou/txstripe)
[![Coverage Status](https://coveralls.io/repos/lextoumbourou/txstripe/badge.svg?branch=master&service=github)](https://coveralls.io/github/lextoumbourou/txstripe?branch=master)

## Usage

Works exactly like [stripe-python](https://github.com/stripe/stripe-python) except each blocking method returns a [Deferred](http://twistedmatrix.com/documents/current/core/howto/defer.html).

## Examples

### In the REPL

```python
$ python -m twisted.conch.stdio
>>> import txstripe
>>> txstripe.api_key = 'ABC123'
>>> txstripe.Customer.all()
<Deferred #0>
Deferred #0 called back: <ListObject list at 0x7f81ddb55eb0> JSON: {
  "data": [
    {
      "account_balance": 0,
      "created": 1441869100,
      "currency": "usd",
      "default_source": "card_123456",
      "delinquent": false,
      "description": "Customer for Bill",
      "discount": null,
      "email": "<EMAIL>",
      "id": "cus_blah",
      "livemode": false,
      "metadata": {},
      "object": "customer",
      "shipping": null,
      "sources": {
       #...
```

### In code

```python
from twisted.internet import reactor
from twisted.internet import defer

import txstripe
txstripe.api_key = 'ABC123'

{'fraction_non_alphanumeric': 0.16513424052960649, 'fraction_numerical': 0.023538065465244576, 'mean_word_length': 4.037037037037037, 'pattern_counts': {'":': 30, '<': 9, '<?xml version=': 0, '>': 27, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1287419', 'n_tokens_mistral': 1011, 'n_tokens_neox': 937, 'n_words': 178}