Bitrix24 API
Project description
API client for Bitrix24
Low-level API client with multiple strategies for lists gathering. All methods support retries.
Regular call (any method)
from b24api import SyncBitrix24
b24 = SyncBitrix24()
result = b24.call({"method": "user.access", "parameters": {"ACCESS": ["G2", "AU"]}})
print(result)
or the same with async
from b24api import AsyncBitrix24
b24 = AsyncBitrix24()
result = await b24.call({"method": "user.access", "parameters": {"ACCESS": ["G2", "AU"]}})
print(result)
Batch call (any method, no limit)
from b24api import SyncBitrix24
b24 = SyncBitrix24()
requests = ({"method": "user.update", "parameters": {"ID": u, "UF_SKYPE": ""}} for u in range(1000))
result = b24.batch(requests)
print(result)
Gathering full list (slow)
Applicable to list methods with start=<offset> support.
Fetches list chunks one by one.
from b24api import SyncBitrix24
b24 = SyncBitrix24()
result = b24.list_sequential({"method": "user.get"})
print(list(result))
Gathering full list (faster)
Applicable to list methods with start=<offset> support.
Fetches first list chunk with regular call, then fetches other chunks with batch.
Approximately 3 times faster then list_sequential.
from b24api import SyncBitrix24
b24 = SyncBitrix24()
result = b24.list_batched({"method": "user.get"})
print(list(result))
Gathering full list (fastest)
Applicable to list methods with filter={<parameters>} support.
Fetches first and last list chunk with batch call, then fetches other chunks with batch. Doesn't use counting (start=-1).
Approximately 2 times faster then list_batched.
from b24api import SyncBitrix24
b24 = SyncBitrix24()
result = b24.list_batched_no_count({"method": "user.get"})
print(list(result))
Gathering full list with required reference
Applicable to list methods with select=[<fields>] and filter={<parameters>} support and required filter parameters.
Fetches first and last list chunk with batch call, then fetches other chunks with batch. Doesn't use counting (start=-1).
from b24api import SyncBitrix24
b24 = SyncBitrix24()
deal_ids = [1, 2, 3] # deals IDs (e.g. from "crm.deal.list" call)
filter_updates = ({"=ENTITY_ID": i} for i in deal_ids)
result = b24.reference_batched_no_count(
{"method": "crm.timeline.comment.list", "parameters": {"ENTITY_TYPE": "deal"}},
filter_updates,
)
print(list(result))
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file b24api-0.7.0.tar.gz.
File metadata
- Download URL: b24api-0.7.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
88a0ae2544ffbe63c106dc05746eb2e29b358576a034c678e14daffde8c7a28a
|
|
| MD5 |
917147bd82cce9c0a41b39936d9aef85
|
|
| BLAKE2b-256 |
db5feacebe1ddf1a4f2555bdef90e3c122a0eec45832c815d2bca20234830793
|
Provenance
The following attestation bundles were made for b24api-0.7.0.tar.gz:
Publisher:
publish-to-pypi.yml on shkarupa-alex/b24api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
b24api-0.7.0.tar.gz -
Subject digest:
88a0ae2544ffbe63c106dc05746eb2e29b358576a034c678e14daffde8c7a28a - Sigstore transparency entry: 355696272
- Sigstore integration time:
-
Permalink:
shkarupa-alex/b24api@31e80c821ccc2d6fc6dfa5f11f0e81c50920ef54 -
Branch / Tag:
refs/tags/0.7.0 - Owner: https://github.com/shkarupa-alex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@31e80c821ccc2d6fc6dfa5f11f0e81c50920ef54 -
Trigger Event:
push
-
Statement type:
File details
Details for the file b24api-0.7.0-py3-none-any.whl.
File metadata
- Download URL: b24api-0.7.0-py3-none-any.whl
- Upload date:
- Size: 13.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
30a08fe6723eb82b552f12b0c4fc38bebcadaf994289fa601544d6368a1221dd
|
|
| MD5 |
16350a15a95d58dca2a3943bc0888525
|
|
| BLAKE2b-256 |
9baed349119f384a6744f427ee261cd22a5871326f12246a37a8f21cbf332dc4
|
Provenance
The following attestation bundles were made for b24api-0.7.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on shkarupa-alex/b24api
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
b24api-0.7.0-py3-none-any.whl -
Subject digest:
30a08fe6723eb82b552f12b0c4fc38bebcadaf994289fa601544d6368a1221dd - Sigstore transparency entry: 355696311
- Sigstore integration time:
-
Permalink:
shkarupa-alex/b24api@31e80c821ccc2d6fc6dfa5f11f0e81c50920ef54 -
Branch / Tag:
refs/tags/0.7.0 - Owner: https://github.com/shkarupa-alex
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@31e80c821ccc2d6fc6dfa5f11f0e81c50920ef54 -
Trigger Event:
push
-
Statement type: