Catalog PyPI
Back to packageRELEASE DETAILS

0.1.20

PyPI

acslib

A library for interacting with Access Control Systems like Genetec or Ccure9k

Published26 Aug 2026
Direct dependencies21
Transitive dependenciesNot calculated

README

Version 0.1.20 documentation

Access Control Systems Library

Release Status

A library for interacting with Access Control Systems like Genetec or Ccure9k. This is a work in progress and is not ready for production use.

Currently development is heavily influenced by Ccure9k, but the goal is to abstract the differences between the two systems and provide a common interface for interacting with them.

Features

  • Currently supports CRUD operations for Personnel, Clearances, Credentials, and ClearanceItem in Ccure9k, and all other Ccure object types.
  • Supports search by custom fields.

Usage

Personnel

Find a person by name

from acslib import CcureAPI

ccure = CcureAPI()
response = ccure.personnel.search("Roddy Piper".split())

Find a person by custom field

from acslib import CcureAPI
from acslib.ccure.filters import PersonnelFilter, FUZZ

ccure = CcureAPI()
search_filter = PersonnelFilter(lookups={"Text1": FUZZ})
response = ccure.personnel.search(["PER0892347"], search_filter=search_filter)

Update a personnel record

from acslib import CcureAPI

# change MiddleName and Text14 for the person with CCure ID 5001
ccure = CcureAPI()
ccure.personnel.update(5001, {"Text14": "new text here", "MiddleName": "Shaquille"})

Add new personnel record

from acslib import CcureAPI
from acslib.ccure.data_models import PersonnelCreateData as pcd

ccure = CcureAPI()
new_person_data = pcd(FirstName="Kenny", LastName="Smith", Text1="001132808")
ccure.personnel.create(new_person_data)

Delete a personnel record

from acslib import CcureAPI

# delete the personnel record with the CCure ID 6008
ccure = CcureAPI()
ccure.personnel.delete(6008)

Clearance

Find a Clearance by name

from acslib import CcureAPI

ccure = CcureAPI()
response = ccure.clearance.search(["suite", "door"])

Find a Clearance by other field

from acslib import CcureAPI
from acslib.ccure.filters import ClearanceFilter, NFUZZ

# search by ObjectID
ccure = CcureAPI()
search_filter = ClearanceFilter(lookups={"ObjectID": NFUZZ})
response = ccure.clearance.search([8897], search_filter=search_filter)

Credential

Find all credentials

from acslib import CcureAPI

ccure = CcureAPI()
response = ccure.credential.search()

Find a credential by name

from acslib import CcureAPI

# fuzzy search by name
ccure = CcureAPI()
response = ccure.credential.search(["charles", "barkley"])

Find a credential by other field

from acslib import CcureAPI
from acslib.ccure.filters import CredentialFilter, NFUZZ

# search by ObjectID
ccure = CcureAPI()
search_filter = CredentialFilter(lookups={"ObjectID": NFUZZ})
response = ccure.credential.search([5001], search_filter=search_filter)

Update a credential

from acslib import CcureAPI

# update CardInt1 for the credential with ObjectID 5001
ccure = CcureAPI()
response = ccure.credential.update(5001, {"CardInt1": 12345})

ClearanceItem

Clearance items include "door" and "elevator."

Find ClearanceItem by name

from acslib import CcureAPI
from acslib.ccure.types import ObjectType

# fuzzy search for doors by name
ccure = CcureAPI()
response = ccure.clearance_item.search(ObjectType.DOOR.complete, ["hall", "interior"])

Find ClearanceItem by other field

from acslib import CcureAPI
from acslib.ccure.filters import ClearanceItemFilter, NFUZZ
from acslib.ccure.types import ObjectType

# search elevators by ObjectID
ccure = CcureAPI()
search_filter = ClearanceItemFilter(lookups={"ObjectID": NFUZZ})
response = ccure.clearance_item.search(ObjectType.ELEVATOR.complete, [5000], search_filter=search_filter)

Get a door's lock state

from acslib import CcureAPI

# get lock state for door 5001. eg. "Unlocked", "Locked", etc
ccure = CcureAPI()
response = ccure.clearance_item.get_lock_state(5001)

Update ClearanceItem

from acslib import CcureAPI
from acslib.ccure.types import ObjectType

# change a door's name
ccure = CcureAPI()
response = ccure.clearance_item.update(ObjectType.DOOR.complete, 5000, update_data={"Name": "new door name 123"})

Create ClearanceItem

from acslib import CcureAPI
from acslib.ccure.data_models import ClearanceItemCreateData
from acslib.ccure.types import ObjectType

# create a new elevator
ccure = CcureAPI()
new_elevator_data = ClearanceItemCreateData(
    Name="New elevator 1",
    Description="newest elevator in town",
    ParentID=5000,
    ParentType="SoftwareHouse.NextGen.Common.SecurityObjects.iStarController",
    ControllerID=5000,
    ControllerClassType="SoftwareHouse.NextGen.Common.SecurityObjects.iStarController"
)
response = ccure.clearance_item.create(ObjectType.ELEVATOR.complete, create_data=new_elevator_data)

Delete ClearanceItem

from acslib import CcureAPI
from acslib.ccure.types import ObjectType

# delete a door
ccure = CcureAPI()
response = ccure.clearance_item.delete(ObjectType.DOOR.complete, 5000)

Other item types

Search for CCure item

from acslib import CcureAPI
from acslib.ccure.filters import CcureFilter, NFUZZ

# search for schedule objects by ObjectID
ccure = CcureAPI()
schedule_type_full = "SoftwareHouse.CrossFire.Common.Objects.TimeSpec"
search_filter = CcureFilter()
response = ccure.ccure_object.search(
    object_type=schedule_type_full,
    search_filter=search_filter,
    terms=[5001]
)

Other common actions

Use ccure.action to perform some common tasks like assigning or revoking clearances or getting personnel images.

Assign a clearance

from acslib import CcureAPI

# assign clearances 5002 and 5003 to person 5005
ccure = CcureAPI()
response = ccure.action.personnel.assign_clearances(
    personnel_id=5005,
    clearance_ids=[5002, 5003],
)

Lock a door

from datetime import datetime, timedelta
from acslib import CcureAPI

# lock door 5050 for ten minutes
ccure = CcureAPI()
response = ccure.action.door.lock(
    door_id=5050,
    lock_time=datetime.now(),
    unlock_time=datetime.now() + timedelta(minutes=10),
)

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 22

Native requirements
21 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
pydantic
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pydantic<3.0.0,>=2.5.3runtime
sat-utils
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sat-utils<2.0.0,>=1.1.12runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest<7.0.0,>=6.2.5; extra == "dev"runtime
pytest-cov
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-cov<5.0.0,>=4.0.0; extra == "dev"runtime
pytest-mock
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-mock<4.0.0,>=3.10.0; extra == "dev"runtime
coverage
Environment
{
  "extras": "toml",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
coverage[toml]>=6.2; extra == "dev"runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
black<24.0.0,>=23.3.0; extra == "dev"runtime
ruff
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
ruff==0.1.1; extra == "dev"runtime
mkdocs-material
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mkdocs-material<10.0.0,>=9.4.6; extra == "dev"runtime
pymdown-extensions
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pymdown-extensions<11.0.0,>=10.3.1; extra == "dev"runtime
mkdocs-include-markdown-plugin
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mkdocs-include-markdown-plugin<7.0.0,>=6.0.3; extra == "dev"runtime
mkdocstrings
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mkdocstrings<1.0.0,>=0.23.0; extra == "dev"runtime
mkdocstrings-python
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mkdocstrings-python<2.0.0,>=1.7.3; extra == "dev"runtime
Pygments
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
Pygments<3.0.0,>=2.10.0; extra == "dev"runtime
bandit
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
bandit<2.0.0,>=1.8.6; extra == "dev"runtime
bandit
Environment
{
  "extras": "toml",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
bandit[toml]<2.0.0,>=1.8.6; extra == "dev"runtime
pre-commit
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pre-commit<3.0.0,>=2.16.0; extra == "dev"runtime
isort
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
isort<6.0.0,>=5.10.1; extra == "dev"runtime
pyupgrade
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pyupgrade<3.0.0,>=2.29.1; extra == "dev"runtime
flit
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
flit<4.0.0,>=3.8.0; extra == "dev"runtime
Faker
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
Faker<21.0.0,>=20.0.0; extra == "dev"runtime
packaging
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
packaging<27.0.0,>=24.0.0; extra == "dev"runtime

Distribution files

2 collected
acslib-0.1.20-py3-none-any.whl

bdist_wheel · 28.3 KB · Python py3

Source file
acslib-0.1.20.tar.gz

sdist · 34.16 KB · Python source

Source file

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 18:28 UTC

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

Record identity

package_version:c4ebb4ca73fda811e825139cba58299828ace312c19d3f71c831725aad6fe32d

Other collected versions

View all collected versions →