Skip to main content

LAHAR API integration wrapper for python

Project description

#Lahar Python: Python wrapper for LAHAR API

Lahar Python helps you to integrate your python based systems with the mailmarketing software provided by LAHAR.

Inspired by the official lahar-ruby package.

Usage

Install:

    pip install lahar-python

Then use it on wherever you need.

  • Import the Client object:
    from lahar import Client
  • Create a client object passing the API token as parameter. optionally you can change the event (defaults to integration)
    client = Client('api-token', event='integration')
  • Call the method to send data to the API:
    # import the LeadStage Enum
    from lahar import LeadStage
    
    # create a dict with the data (check the LAHAR api docs for the available keys)
    data = dict(email_contato='valid@email.com')
    # create a new lead (sends the data to /conversions endpoint
    client.create_lead(data)
    
    # update a leadstage
    new_stage = LeadStage.CLIENT
    client.change_lead_status(data, new_stage)

Contribute

Your contribution is welcome.

Setup your development enviroment:

    git clone git@github.com:virb30/lahar-python.git
    cd lahar-python
    python -m venv .venv
    source .venv/bin/activate
    # or .venv\Scripts\activate on windows
    pip install -r requirements.txt
    python -m unittest

License

The MIT License (MIT)

Copyright (c) 2021 Vinicius Boscoa

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

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

Source Distribution

lahar-python-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lahar_python-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file lahar-python-0.1.0.tar.gz.

File metadata

  • Download URL: lahar-python-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for lahar-python-0.1.0.tar.gz
Algorithm Hash digest
SHA256 58ad41ab5df197490c319642dbca6428ad3d451d06592e8f3b9f50b2cdcee7b4
MD5 72ebf00591851d2fbcbc0fd185b2aebc
BLAKE2b-256 46d34d430bc71a705620b5a9ddc59c51ea18aa8dd831daedb46af412d55716d9

See more details on using hashes here.

File details

Details for the file lahar_python-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lahar_python-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.8.5

File hashes

Hashes for lahar_python-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ab5614f8bd853c3df9d230a98f1385738b98a219a98af6e30e4e66d10a8419a3
MD5 3754f5ac6d6d9aba84d67a972b9c8a9c
BLAKE2b-256 a5e835d83b2899f1de71210d2afffeebd4c9897aae984375698ab8bcc6144100

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page