Skip to main content

PyOffers

Build Coverage Version Python versions License

Python client library for HasOffers API.

Installation

PyOffers can be obtained with pip:

$ pip install pyoffers

Usage example

Initialize API client:

>>> from pyoffers.api import HasOffersAPI
>>> hasoffers = HasOffersAPI(
    endpoint='https://api.hasoffers.com/Apiv3/json',
    network_token='<your_network_token>',
    network_id='<your_network_id>',
)

Execute queries:

   >>> # Get all offers with ID greater than 100, sorted by ID and with loaded `Country` data
   >>> hasoffers.offers.find_all(id__gt=100, sort='id', contain=['Country'])
   [<Offer: 102>,
<Offer: 104>,
<Offer: 106>,
<Offer: 108>,
<Offer: 110>,
<Offer: 112>]
   >>> # Get all clicks records for 2016-09-20
   >>> hasoffers.raw_logs.clicks.find_all('20160920')
   [<LogRecord: 7 (1027a606128bd067105f0b0921840f)>, ...]
   >>> # Get all conversions for specific offer
   >>> offer = hasoffers.offers.get_by_id(100)
   >>> offer.conversions.find_all()
   [<Conversion: 70532>]

Documentation

You can view documentation online at:

Or you can look at the docs/ directory in the repository.

Python support

PyOffers supports Python 3.5+.

Release files for pyoffers 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyoffers 0.7.0
File Size Uploaded
pyoffers-0.7.0.tar.gz 13.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyoffers 0.7.0
File Interpreter ABI Platform
pyoffers-0.7.0-py3-none-any.whl Python 3 none any Details

Total release size: 29.9 kB

Release files / pyoffers-0.7.0.tar.gz

Download URL pyoffers-0.7.0.tar.gz
Size 13.7 kB
Tags Source
SHA-256 checksum
How to use checksums
067d4fa2de6fb078133ff5918163d694e7674ebffac7a3b154d6cc7a559bffd3
BLAKE2b-256 checksum
How to use checksums
a6fe0393df358e2fedb040ec1baed2994c74a1d6fefb2e1f2d6fd5ba65402d97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release files / pyoffers-0.7.0-py3-none-any.whl

Download URL pyoffers-0.7.0-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d624ee5aeced3e8392ec281b0f6b036a1e871e83d91169ee8940b110fdd4b74c
BLAKE2b-256 checksum
How to use checksums
868f92c99997ffaf114c8ff7c85f938076b314f99d4d7eaf0a3aa0f3ab2798c0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.3.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.7.0 This release

2 release files

0.6.9

2 release files

0.6.8

2 release files

0.6.7

2 release files

0.6.6

2 release files

0.6.5

2 release files

0.6.4

2 release files

0.6.3

2 release files

0.6.2

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page