Skip to main content

An unofficial python SDK for the Bob HR platform.

Project description

PyBob

Code style: black

PyBob is an unofficial python SDK for the Bob API

Initialise

pip install pybob-sdk
from pybob_sdk import Bob

bob = Bob(
    service_account_id="YOUR_SERVICE_ACCOUNT_ID_HERE"
    service_account_token="YOUR_SERVICE_ACCOUNT_TOKEN_HERE"
)

Examples

Company search

# Search company people
employee = bob.people.search(
    fields=["root.id", "root.fullName", "root.email"],
    filters=[{
        "fieldPath": "root.email",
        "operator": "equals",
        "values": ["anakin.skywalker@company.com"]
        }]
)

print(employee)

Output

{ 'employees' : [
    {
    'fullName': 'Anakin Skywalker', 
    '/root/email': {
        'value': 'anakin.skywalker@company.com'
        }, 
    '/root/fullName': {
        'value': 'Anakin Skywalker'
        }, 
    'email': 'anakin.skywalker@company.com', 
    '/root/id': {
        'value': '123456789'
        }, 
    'id': '123456789'
        }
    ] 
}

Employment history

# List employment history
results = bob.people.employee.list_employment_history(
    employeeId="123456789"
)

working_pattern = results["values"][0]["workingPattern"]["days"]

for day, hours in working_pattern.items():
    print(f"{day}: {hours}")

Output

monday: 7
tuesday: 7
wednesday: 7
thursday: 7
friday: 7
saturday: 0
sunday: 0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pybob_sdk-0.1.82.tar.gz (18.2 kB view details)

Uploaded Source

Built Distribution

pybob_sdk-0.1.82-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file pybob_sdk-0.1.82.tar.gz.

File metadata

  • Download URL: pybob_sdk-0.1.82.tar.gz
  • Upload date:
  • Size: 18.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Linux/6.2.0-1019-azure

File hashes

Hashes for pybob_sdk-0.1.82.tar.gz
Algorithm Hash digest
SHA256 972c23ae6e7c1b8734aa58199994d6140cdef2a6670470ad3cf8bfe6dd1e47b9
MD5 ea9aa07895120092269865e38a11cb87
BLAKE2b-256 e1eda0aa16857f089af9cc9888b1100d4a39ee51588b4fad2fba81de1085fb99

See more details on using hashes here.

File details

Details for the file pybob_sdk-0.1.82-py3-none-any.whl.

File metadata

  • Download URL: pybob_sdk-0.1.82-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.2 CPython/3.10.13 Linux/6.2.0-1019-azure

File hashes

Hashes for pybob_sdk-0.1.82-py3-none-any.whl
Algorithm Hash digest
SHA256 becf61159f48f4a42f5067af497c1e80fcedb7d3063c4cd1f2a4a52b824ea477
MD5 ffff1877de6a93cac9063f6fc859e17c
BLAKE2b-256 c938250d8c1015875c2ed01184ea3622c54f8fc4911d300bf1efdc6645fe9873

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page