Skip to content
This repository was archived by the owner on Sep 13, 2023. It is now read-only.

Commit 4242afd

Browse files
committed
Merge branch 'master' of github.com:billogram/billogram-v2-api-python-lib
2 parents 5192f5f + 4c82bb4 commit 4242afd

File tree

7 files changed

+40
-6
lines changed

7 files changed

+40
-6
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1+
MANIFEST
2+
dist/
13
*.pyc
24
.DS_Store
5+
_testing_defaults.py

MANIFEST.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
include examples.py
2+
include LICENSE

README

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
Billogram v2 API client library
2+
3+
This library provides convenient wrappers for connecting to the public API
4+
of the Billogram invoicing service.
5+
6+
Full documentation for the API: <https://billogram.com/api/documentation>
7+
8+
The file examples.py contains several code examples for calling the API
9+
using the library. Note that this file is not installed when using the
10+
distutils installation.
11+
12+
13+
Copyright 2013 Billogram AB.
14+
Made available under MIT license, see LICENSE file.

README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

billogram_api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -671,7 +671,7 @@ class BillogramQuery(Query):
671671

672672
def filter_state_any(self, *states):
673673
"Find billogram objects with any state of the listed ones"
674-
if len(states) == 1 and (isinstance(states[0], list) or isinstane(states[0], tuple) or isinstance(states[0], set) or isinstance(states[0], frozenset)):
674+
if len(states) == 1 and (isinstance(states[0], list) or isinstance(states[0], tuple) or isinstance(states[0], set) or isinstance(states[0], frozenset)):
675675
states = states[0]
676676
assert all(isinstance(s, basestring) for s in states)
677677
return self.filter_field('state', ','.join(states))

examples.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ def example2(api):
135135
print("Current price for item {} is {}".format(item['item_no'], item['price']))
136136
# modify the item
137137
item.update({
138-
'price': item['price']*1.1
138+
'price': round(item['price']*1.1, 2)
139139
})
140140
print(" New price is {}".format(item['price']))
141141

setup.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#!/usr/bin/env python
2+
#encoding=utf8
3+
4+
from distutils.core import setup
5+
6+
with open('README') as file:
7+
long_description = file.read()
8+
9+
setup(
10+
name='billogram_api',
11+
version='1.0.1',
12+
author='Billogram AB',
13+
author_email='[email protected]',
14+
description='Library for connecting to the Billogram v2 API',
15+
long_description=long_description,
16+
url='https://billogram.com/api/documentation',
17+
license='MIT',
18+
py_modules=['billogram_api'],
19+
)

0 commit comments

Comments
 (0)