Skip to main content

Python client library for HasOffers API

Project description


Build Coverage Version Python versions License

Python client library for HasOffers API.


PyOffers can be obtained with pip:

$ pip install pyoffers

Usage example

Initialize API client:

>>> from pyoffers.api import HasOffersAPI
>>> hasoffers = HasOffersAPI(

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>]


You can view documentation online at:

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

Python support

PyOffers supports Python 3.5+.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyoffers, version 0.7.0
Filename, size File type Python version Upload date Hashes
Filename, size pyoffers-0.7.0-py3-none-any.whl (16.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size pyoffers-0.7.0.tar.gz (13.7 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page