skillfed

onelogin

OneLogin API Python SDK

onelogin v4.0.1 166.4K downloads/30d#10,495 on PyPI40
License unclear NoLicense Active released

What it is and what it does

The onelogin package is the official Python SDK for OneLogin's REST API. It wraps OAuth2 client-credentials authentication and provides typed API clients for managing users, roles, groups, and applications within a OneLogin tenant. The SDK uses Pydantic for request/response validation and urllib3 for HTTP transport, making it straightforward to integrate OneLogin identity operations into Python applications.

Typical usage involves creating a Configuration object with your OneLogin subdomain and API credentials, exchanging those credentials for an OAuth2 access token, and then instantiating API client objects (UsersV2Api, RolesApi, etc.) to perform CRUD operations. The SDK is actively maintained and supports current Python versions; it requires Python 3.10+ and enforces Pydantic 2.11+ to avoid validation-layer incompatibilities.

Use it for:

  • Automate user provisioning and deprovisioning workflows by creating, updating, or deleting users and group memberships programmatically.
  • Build identity-aware applications that query OneLogin for user roles and group membership to enforce access control.
  • Migrate users or configuration data between OneLogin tenants or from legacy systems into OneLogin.
  • Monitor and audit OneLogin resources (users, roles, apps) by fetching and analyzing their current state.
  • Integrate OneLogin authentication into CI/CD pipelines or infrastructure-as-code tools for role-based access management.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Official Python SDK for OneLogin's API, enabling programmatic management of users, roles, groups, apps, and OAuth2 authentication against OneLogin's identity platform.

Yes, if you are actively using OneLogin and need to manage identity resources programmatically. The SDK is actively maintained, has low install friction, and provides a clean Pydantic-based interface to OneLogin's API. Verify the license terms before adopting in a commercial context, and confirm that your OneLogin API credentials carry the required scopes for your use case.

Install

onelogin on PyPI

pip

pip install onelogin

uv

uv add onelogin

poetry

poetry add onelogin

Installing onelogin

Before you install

Low install friction with a pure-Python wheel. Actively maintained with a release 43 days ago. Requires Python 3.10+ and Pydantic 2.11+; the Pydantic constraint is enforced and documented, reducing version-mismatch surprises.

License in practice

License treatment is unclear (marked 'NoLicense' with no SPDX identifier). Before adopting in a commercial or copyleft context, verify the actual license terms in the repository or contact the maintainers.

Quickstart

pip install onelogin

import os
import onelogin

configuration = onelogin.Configuration(
    host="https://your-subdomain.onelogin.com",
    username=os.environ["ONELOGIN_CLIENT_ID"],
    password=os.environ["ONELOGIN_CLIENT_SECRET"],
)

with onelogin.ApiClient(configuration) as api_client:
    token_api = onelogin.OAuth2Api(api_client)
    token = token_api.generate_token({"grant_type": "client_credentials"})
    configuration.access_token = token.access_token
    users_api = onelogin.UsersV2Api(api_client)
    users_api.list_users2()

Requires Python 3.10+, Pydantic 2.11+, and valid OneLogin API credentials (Client ID and Client Secret) with appropriate scopes from the OneLogin admin portal.

Verify before relying

  • Whether the 'NoLicense' designation reflects a missing license file, a proprietary license, or an oversight in metadata.
  • Scope and rate limits of the OneLogin API itself (not documented in the SDK excerpt).
  • Whether all OneLogin API endpoints are covered by the SDK or if direct HTTP calls are sometimes necessary.

Package facts

License NoLicense (unclear)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 5 — urllib3, python-dateutil, pydantic, aenum, setuptools
Maintenance actively maintained — 43 days since the last release
Last repo commit
First released
Downloads 166,381/month — #10,495 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: onelogin-4.0.1-py3-none-any.whl

Keywords: OneLogin, SDK, API

Tags

onelogin api clientidentity management sdkoauth2 client credentialsuser provisioning apisingle sign-on integrationaccess management sdkauthentication api python
identity-managementoauth2api-client

More Internet packages