Skip to content

SreethulKrishna/crosschexcloudapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

3 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš€ crosschexcloudapi – Python SDK for Anviz CrossChex Cloud

Python Version License PyPI Downloads GitHub stars

Tired of dealing with complex CrossChex Cloud API authentication and pagination?

crosschexcloudapi is a clean Python SDK that simplifies working with the Anviz CrossChex Cloud API.

βœ” Automatic token management βœ” Built-in pagination handling βœ” Clean and structured responses βœ” Minimal setup, production-ready

Perfect for HRMS, attendance sync systems, and cloud integrations.


⚑ Quick Start

from crosschexcloudapi import CrossChexCloudAPI

api = CrossChexCloudAPI(
    api_url="https://api.crosschexcloud.com",
    api_key="YOUR_API_KEY",
    api_secret="YOUR_API_SECRET",
    anviz_request_id="REQUEST_ID"
)

# Fetch attendance records
records = api.get_attendance_records()
print(records)

πŸ“¦ Installation

pip install crosschexcloudapi

❓ Why This Library?

Working directly with CrossChex Cloud API involves:

  • Token expiration handling
  • Complex payload structure
  • Manual pagination
  • Repeated authentication calls

This library solves it by:

  • πŸ” Automatically generating & refreshing tokens
  • πŸ” Handling expired tokens internally
  • πŸ“„ Managing pagination transparently
  • βš™οΈ Providing simple Python methods
  • 🧠 Reducing API complexity drastically

✨ Features

  • πŸ” Automatic token generation & renewal
  • πŸ“Š Fetch attendance logs with pagination support
  • ⏱ ISO timestamp handling
  • πŸ” Retry on token expiration
  • πŸ“¦ Clean structured response format
  • ⚑ Lightweight (requests only)

πŸ›  Real-World Use Cases

  • Sync attendance data to HRMS
  • Build payroll automation pipelines
  • Integrate Anviz devices into SaaS platforms
  • Centralize biometric data from multiple locations

πŸ“„ Usage Examples

πŸ”‘ Test connection & get token

token_info = api.test_connection()
print(token_info)

πŸ“Š Fetch attendance records (date range)

from datetime import datetime

records = api.get_attendance_records(
    begin_time=datetime(2025, 10, 1, 0, 0, 0),
    end_time=datetime(2025, 10, 18, 23, 59, 59)
)

print(records)

πŸ“¦ Example Response

{
  "token": "abc123",
  "expires": "2025-10-20T10:00:00",
  "count": 2,
  "list": [
    {
      "employee_id": "E1001",
      "check_time": "2025-10-18T09:00:00",
      "type": "checkin"
    }
  ]
}

🧠 How It Works (Under the Hood)

  • Generates token using API key & secret
  • Stores token + expiry internally
  • Auto-refreshes token when expired
  • Fetches paginated data until complete
  • Returns a single merged dataset

No manual handling needed.


πŸ“š API Overview

πŸ” Authentication

  • get_token()
  • test_connection()

πŸ“Š Attendance

  • get_attendance_records()
  • get_attendance_payload()

βš™οΈ Internal Helpers

  • _post()
  • _is_token_expired()

⚠️ Requirements

  • Python 3.10+
  • requests>=2.28.0

🚧 Roadmap

  • Async support
  • Webhook support
  • Filtering helpers
  • Better error handling

🀝 Contributing

Contributions are welcome!

Steps:

  1. Fork the repository
  2. Create a branch: git checkout -b feature-name
  3. Commit: git commit -m "Add feature"
  4. Push: git push origin feature-name
  5. Open a Pull Request

πŸ“„ License

Licensed under LGPL-3.0 πŸ‘‰ https://www.gnu.org/licenses/lgpl-3.0.html


πŸ”— Links


⭐ Support

If this project helps you:

  • ⭐ Star the repo
  • πŸ› Report issues
  • πŸ” Share with others

🎯 Final Note

If you're integrating Anviz CrossChex Cloud with your backend, this library removes 80% of the complexity.

Build faster. Integrate smarter.

About

Python library for Anviz CrossChex Cloud API integration (attendance & device management)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages