Skip to main content

Alegra Bindings for Python

A Python library for Alegra’s API.

Setup

You can install this package by using the pip tool and installing:

$ pip install alegra

Usage

The library needs to be configured with your user and token which is available in your Alegra Account: https://app.alegra.com/configuration/api

Set alegra.user and alegra.token to their values:

import alegra

alegra.user = "...@..."
alegra.token = "..."

# List contacts.
alegra.Contact.list()

# Create contact.
alegra.Contact.create(
  name="Chaty",
  identification={
    "type": "RUC", "number": "20000000000",
  },
  email="developer@okchaty.com",
  type=["client"],
  address={
    "address": "Jr. Neptuno 777",
    "city": "Lima, Peru",
  },
)

# Retrieve contact.
alegra.Contact.retrieve(123)

# Modify contact.
alegra.Contact.modify(
  resource_id=contact_id,
  identification={
    "type": "RUC",
    "number": "20000000001",
  },
)

# Delete contact.
alegra.Contact.delete(123)

Using the Alegra API

Documentation can be found here:

Metadata

Release files for alegra 0.1.1

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

Source distribution (sdist)

Source distribution for alegra 0.1.1
File Size Uploaded Provenance Actions
alegra-0.1.1.tar.gz 5.0 kB Without provenance Details for alegra-0.1.1.tar.gz

Built distribution (wheel)

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

Total release size: 14.3 kB

Release files / alegra-0.1.1.tar.gz

Download URL alegra-0.1.1.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
37d24fdd04f1a7fdf78b75427caaaa9bcd5092d3fd6f0ab781fe8d61f38fcb37
BLAKE2b-256 checksum
How to use checksums
9fb3653f60fdbf79a130b0360ae3d328f6619ce24ae05cbd8671640b6ebfd3a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

Release files / alegra-0.1.1-py3-none-any.whl

Download URL alegra-0.1.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6b3baa55bb902d885042851c961fdacd1c8b3d62b8b34dc3aad7e9add6374fec
BLAKE2b-256 checksum
How to use checksums
605b86429748fc55094811ec80b1f2fdf7f967223f0e61ff9b963eafdb378a98
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.8.0

Security for alegra 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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