Skip to content

kayak/wespe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

0ce7191 · Apr 3, 2024

History

69 Commits
Nov 9, 2018
Apr 3, 2024
Sep 11, 2018
Jan 30, 2020
Jan 30, 2020
Nov 13, 2018
Jan 30, 2020
Sep 11, 2018
Sep 14, 2018
Nov 9, 2018
Jan 30, 2020
Nov 9, 2018
Apr 3, 2024
Jul 23, 2020
Apr 3, 2024
Jul 23, 2020
Jul 23, 2020

Repository files navigation

Wespe - Batching ad tech providers’ operations for humans

BuildStatus CoverageStatus Codacy Docs PyPi License

Abstract

What is Wespe?

Wespe is a Python API for batching requests when interfacing AdTech providers (e.g. adwords, facebook business). The motivation behind Wespe is to provide a simple and consistent interface for batching requests. Currently it only supports Facebook Business. Other providers will be added in the future.

Read the docs: http://wespe.readthedocs.io/en/latest/

Installation

Wespe supports python 3.6+. It may also work on pypy, cython, and jython, but is not being tested for these versions.

To install Wespe run the following command:

pip install wespe

Usage - Facebook Business

All steps from now on will assume you've already set the default api connection using facebook_busines. It's also possible to set one on the fly by providing the api kwarg in FacebookBatchUploader's constructor.

from wespe.batch_uploaders import FacebookBatchUploader

# There is no request limit. If necessary Wespe will coordinate the execution of multiple FacebookAdsApiBatch
# instances.
batch_uploader = FacebookBatchUploader(requests)

try:
    batch_uploader.execute()
except BatchExecutionError:
    for error in batch_uploader.errors:
        # See FacebookBatchRequestError for more info on what you can do
        pass

for response in batch_uploader.responses:
    # See FacebookBatchResponse for more info on what you can do
    pass

License

Copyright 2016 KAYAK Germany, GmbH

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Crafted with ♥ in Berlin.