Current collected state Current
Observed since 21 Oct, 11:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
Is an asynchronous implementation for AlfaCRM API
aioalfacrm - is an asynchronous implementation for the AlfaCRM API
$ 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())
# Get all entities
for page in alfa_client. < object >.get_paginator():
objects = page.items
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())
pypistats · 55 observations shown. Missing days are unknown. Source category: overall: without mirrors.
| Date / source period | Value | Observed at |
|---|---|---|
| 2026-10-20 – 2026-10-20 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-17 – 2026-10-17 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-16 – 2026-10-16 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-15 – 2026-10-15 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-14 – 2026-10-14 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-13 – 2026-10-13 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-12 – 2026-10-12 | 4 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-10 – 2026-10-10 | 19 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-09 – 2026-10-09 | 4 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-08 – 2026-10-08 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-07 – 2026-10-07 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-06 – 2026-10-06 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-02 – 2026-10-02 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-10-01 – 2026-10-01 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-30 – 2026-09-30 | 4 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-29 – 2026-09-29 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-28 – 2026-09-28 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-27 – 2026-09-27 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-26 – 2026-09-26 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-25 – 2026-09-25 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-23 – 2026-09-23 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-20 – 2026-09-20 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-19 – 2026-09-19 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-17 – 2026-09-17 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-16 – 2026-09-16 | 4 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-15 – 2026-09-15 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-14 – 2026-09-14 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-09 – 2026-09-09 | 36 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-07 – 2026-09-07 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-06 – 2026-09-06 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-02 – 2026-09-02 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-09-01 – 2026-09-01 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-31 – 2026-08-31 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-30 – 2026-08-30 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-29 – 2026-08-29 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-28 – 2026-08-28 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-25 – 2026-08-25 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-24 – 2026-08-24 | 6 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-23 – 2026-08-23 | 4 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-22 – 2026-08-22 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-21 – 2026-08-21 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-20 – 2026-08-20 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-17 – 2026-08-17 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-15 – 2026-08-15 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-14 – 2026-08-14 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-10 – 2026-08-10 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-09 – 2026-08-09 | 8 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-08 – 2026-08-08 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-06 – 2026-08-06 | 2 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-02 – 2026-08-02 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-08-01 – 2026-08-01 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-07-30 – 2026-07-30 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-07-27 – 2026-07-27 | 3 | 2026-10-21T12:55:42.3972993Z |
| 2026-07-26 – 2026-07-26 | 1 | 2026-10-21T12:55:42.3972993Z |
| 2026-07-23 – 2026-07-23 | 3 | 2026-10-21T12:55:42.3972993Z |
| Version | Published | Direct dependencies | Open version |
|---|---|---|---|
| 0.3.2 | 23 Nov 2021 | 1 |
This describes our collected data; it is not a security assessment.
Observed since 21 Oct, 11:36 UTC
No superseded metadata states collected. Unchanged observations do not create new revisions.
package:298c613656c7186f554243758574fc0551d8589b85438bc6fb6a71c0c505c7a5