Catalog PyPI
PACKAGE EXPLORERView in registry

aioalfacrm

PyPI

Is an asynchronous implementation for AlfaCRM API

aioalfacrmalfacrmapiasynciowrapper
Versions collected1
Direct dependencies1From release 0.3.2
Last observed21 Oct, 11:36 UTC

README

Version 0.3.2 documentation

AIOAlfacrm

PyPi Package Version Supported python versions MIT License Downloads Codecov Tests

aioalfacrm - is an asynchronous implementation for the AlfaCRM API

Package is in development

Installation using pip

$ pip install aioalfacrm

Example:

import asyncio
from aioalfacrm import AlfaClient
from aioalfacrm.entities import Location

HOSTNAME = 'demo.s20.online'
EMAIL = 'api-email@email.example'
API_KEY = 'user-api-token'
BRANCH_ID = 1


async def main():
    alfa_client = AlfaClient(
        hostname=HOSTNAME,
        email=EMAIL,
        api_key=API_KEY,
        branch_id=BRANCH_ID,
    )
    try:
        # Check auth (Optionaly)
        if not await alfa_client.check_auth():
            print('Authentification error')
            return
        # Get branches
        branches = await alfa_client.branch.list(page=0, count=20)

        # Edit branch
        for branch in branches:
            branch.name = f'{branch.name} - Edited'
            # Save branch
            await alfa_client.branch.save(branch)

        # Create location
        location = Location(
            branch_id=1,
            is_active=True,
            name='New location',
        )
        await alfa_client.location.save(location)

    finally:
        # Close session
        await alfa_client.close()


asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())  # For Windows
asyncio.run(main())


Paginator

# Get all entities
for page in alfa_client. < object >.get_paginator():
    objects = page.items

Custom fields

To work with custom fields, do the following

from aioalfacrm import entities
from aioalfacrm import fields
from typing import Optional


# Extend existing model
class CustomCustomer(entities.Customer):
    custom_field: Optional[int] = fields.Integer()

    # For IDE init support
    def __init__(
            self,
            custom_field: Optional[int] = None,
            *args,
            **kwargs,
    ):
        super(CustomCustomer, self).__init__(custom_field=custom_field, *args, **kwargs)


# Create custom alfa client with new model
from aioalfacrm import AlfaClient
from aioalfacrm import managers


class CustomAlfaClient(AlfaClient):

    def __init__(self, *args, **kwargs):
        super(CustomAlfaClient, self).__init__(*args, **kwargs)

        self.customer = managers.Customer(
            api_client=self.api_client,
            entity_class=CustomCustomer,
        )


# Create custom alfa client
import asyncio

HOSTNAME = 'demo.s20.online'
EMAIL = 'api-email@email.example'
API_KEY = 'user-api-token'
BRANCH_ID = 1


async def main():
    alfa_client = CustomAlfaClient(hostname=HOSTNAME, email=EMAIL, api_key=API_KEY, branch_id=BRANCH_ID)
    try:
        customers = await alfa_client.customer.list()
        for customer in customers:
            print(customer.custom_field)
    finally:
        await alfa_client.close()


asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())  # For Windows
asyncio.run(main())

Downloads & popularity

2downloads
1-day window · source-reported counts20 Oct 2026
36180
2026-07-23: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-07-23–2026-07-232026-07-26: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-07-26–2026-07-262026-07-27: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-07-27–2026-07-272026-07-30: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-07-30–2026-07-302026-08-01: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-02–2026-08-022026-08-06: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-06–2026-08-062026-08-08: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-08–2026-08-082026-08-09: 8 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-09–2026-08-092026-08-10: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-10–2026-08-102026-08-14: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-14–2026-08-142026-08-15: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-15–2026-08-152026-08-17: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-17–2026-08-172026-08-20: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-20–2026-08-202026-08-21: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-21–2026-08-212026-08-22: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-22–2026-08-222026-08-23: 4 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-23–2026-08-232026-08-24: 6 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-24–2026-08-242026-08-25: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-25–2026-08-252026-08-28: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-28–2026-08-282026-08-29: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-29–2026-08-292026-08-30: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-30–2026-08-302026-08-31: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-08-31–2026-08-312026-09-01: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-01–2026-09-012026-09-02: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-02–2026-09-022026-09-06: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-06–2026-09-062026-09-07: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-07–2026-09-072026-09-09: 36 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-09–2026-09-092026-09-14: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-14–2026-09-142026-09-15: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-15–2026-09-152026-09-16: 4 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-16–2026-09-162026-09-17: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-17–2026-09-172026-09-19: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-19–2026-09-192026-09-20: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-20–2026-09-202026-09-23: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-23–2026-09-232026-09-25: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-25–2026-09-252026-09-26: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-26–2026-09-262026-09-27: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-27–2026-09-272026-09-28: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-28–2026-09-282026-09-29: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-29–2026-09-292026-09-30: 4 · observed 2026-10-21T12:55:42.3972993Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-01–2026-10-012026-10-02: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-02–2026-10-022026-10-06: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-06–2026-10-062026-10-07: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-07–2026-10-072026-10-08: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-08–2026-10-082026-10-09: 4 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-09–2026-10-092026-10-10: 19 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-10–2026-10-102026-10-12: 4 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-12–2026-10-122026-10-13: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-13–2026-10-132026-10-14: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-14–2026-10-142026-10-15: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-15–2026-10-152026-10-16: 1 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-16–2026-10-162026-10-17: 3 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-17–2026-10-172026-10-20: 2 · observed 2026-10-21T12:55:42.3972993Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 55 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2022026-10-21T12:55:42.3972993Z
2026-10-17 – 2026-10-1732026-10-21T12:55:42.3972993Z
2026-10-16 – 2026-10-1612026-10-21T12:55:42.3972993Z
2026-10-15 – 2026-10-1522026-10-21T12:55:42.3972993Z
2026-10-14 – 2026-10-1432026-10-21T12:55:42.3972993Z
2026-10-13 – 2026-10-1312026-10-21T12:55:42.3972993Z
2026-10-12 – 2026-10-1242026-10-21T12:55:42.3972993Z
2026-10-10 – 2026-10-10192026-10-21T12:55:42.3972993Z
2026-10-09 – 2026-10-0942026-10-21T12:55:42.3972993Z
2026-10-08 – 2026-10-0812026-10-21T12:55:42.3972993Z
2026-10-07 – 2026-10-0712026-10-21T12:55:42.3972993Z
2026-10-06 – 2026-10-0612026-10-21T12:55:42.3972993Z
2026-10-02 – 2026-10-0232026-10-21T12:55:42.3972993Z
2026-10-01 – 2026-10-0112026-10-21T12:55:42.3972993Z
2026-09-30 – 2026-09-3042026-10-21T12:55:42.3972993Z
2026-09-29 – 2026-09-2912026-10-21T12:55:42.3972993Z
2026-09-28 – 2026-09-2822026-10-21T12:55:42.3972993Z
2026-09-27 – 2026-09-2722026-10-21T12:55:42.3972993Z
2026-09-26 – 2026-09-2622026-10-21T12:55:42.3972993Z
2026-09-25 – 2026-09-2522026-10-21T12:55:42.3972993Z
2026-09-23 – 2026-09-2312026-10-21T12:55:42.3972993Z
2026-09-20 – 2026-09-2022026-10-21T12:55:42.3972993Z
2026-09-19 – 2026-09-1912026-10-21T12:55:42.3972993Z
2026-09-17 – 2026-09-1712026-10-21T12:55:42.3972993Z
2026-09-16 – 2026-09-1642026-10-21T12:55:42.3972993Z
2026-09-15 – 2026-09-1512026-10-21T12:55:42.3972993Z
2026-09-14 – 2026-09-1412026-10-21T12:55:42.3972993Z
2026-09-09 – 2026-09-09362026-10-21T12:55:42.3972993Z
2026-09-07 – 2026-09-0732026-10-21T12:55:42.3972993Z
2026-09-06 – 2026-09-0612026-10-21T12:55:42.3972993Z
2026-09-02 – 2026-09-0232026-10-21T12:55:42.3972993Z
2026-09-01 – 2026-09-0132026-10-21T12:55:42.3972993Z
2026-08-31 – 2026-08-3112026-10-21T12:55:42.3972993Z
2026-08-30 – 2026-08-3012026-10-21T12:55:42.3972993Z
2026-08-29 – 2026-08-2912026-10-21T12:55:42.3972993Z
2026-08-28 – 2026-08-2812026-10-21T12:55:42.3972993Z
2026-08-25 – 2026-08-2512026-10-21T12:55:42.3972993Z
2026-08-24 – 2026-08-2462026-10-21T12:55:42.3972993Z
2026-08-23 – 2026-08-2342026-10-21T12:55:42.3972993Z
2026-08-22 – 2026-08-2212026-10-21T12:55:42.3972993Z
2026-08-21 – 2026-08-2122026-10-21T12:55:42.3972993Z
2026-08-20 – 2026-08-2012026-10-21T12:55:42.3972993Z
2026-08-17 – 2026-08-1722026-10-21T12:55:42.3972993Z
2026-08-15 – 2026-08-1522026-10-21T12:55:42.3972993Z
2026-08-14 – 2026-08-1422026-10-21T12:55:42.3972993Z
2026-08-10 – 2026-08-1012026-10-21T12:55:42.3972993Z
2026-08-09 – 2026-08-0982026-10-21T12:55:42.3972993Z
2026-08-08 – 2026-08-0812026-10-21T12:55:42.3972993Z
2026-08-06 – 2026-08-0622026-10-21T12:55:42.3972993Z
2026-08-02 – 2026-08-0212026-10-21T12:55:42.3972993Z
2026-08-01 – 2026-08-0112026-10-21T12:55:42.3972993Z
2026-07-30 – 2026-07-3012026-10-21T12:55:42.3972993Z
2026-07-27 – 2026-07-2732026-10-21T12:55:42.3972993Z
2026-07-26 – 2026-07-2612026-10-21T12:55:42.3972993Z
2026-07-23 – 2026-07-2332026-10-21T12:55:42.3972993Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.3.223 Nov 20211

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
stas12312/aioalfacrm

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:36 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:298c613656c7186f554243758574fc0551d8589b85438bc6fb6a71c0c505c7a5