Skip to content

Commit f97ee39

Browse files
committed
docs: add dependency details and troubleshooting section to README
1 parent f3a3cfd commit f97ee39

File tree

1 file changed

+31
-2
lines changed

1 file changed

+31
-2
lines changed

README.md

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,14 @@ For more information about the OneLogin API, visit the [OneLogin API Documentati
77
## Support
88
OneLogin by One Identity open source projects are supported through [OneLogin GitHub issues](https://github.com/onelogin/onelogin-python-sdk/issues). This includes all scripts, plugins, SDKs, modules, code snippets or other solutions. For assistance with any OneLogin by One Identity GitHub project, please raise a new Issue on the [OneLogin GitHub issues](https://github.com/onelogin/onelogin-python-sdk/issues) page. Requests for assistance made through official One Identity Support will be referred back to GitHub where those requests can benefit all users.
99

10-
## Requirements.
10+
## Requirements
1111

12-
Python 3.7+
12+
- Python 3.7+
13+
- Dependencies:
14+
- Pydantic 2.11+ (latest version)
15+
- urllib3 2.0.2+
16+
- python-dateutil 2.5.3+
17+
- aenum 3.1.11+
1318

1419
## Installation & Usage
1520

@@ -66,6 +71,7 @@ configuration = onelogin.Configuration(
6671

6772
# Set your API credentials
6873
# Use environment variables to avoid hardcoding credentials
74+
# IMPORTANT: Use ONELOGIN_CLIENT_ID and ONELOGIN_CLIENT_SECRET for your environment variables
6975
configuration = onelogin.Configuration(
7076
username = os.environ["ONELOGIN_CLIENT_ID"],
7177
password = os.environ["ONELOGIN_CLIENT_SECRET"]
@@ -114,3 +120,26 @@ The OneLogin API supports the following scopes:
114120
- **Read All**: Read-only access to all API resources
115121

116122
You can set up your API credentials with appropriate scopes in the OneLogin portal under Security > API Credentials.
123+
124+
## Troubleshooting
125+
126+
### ImportError with Pydantic
127+
If you encounter an error like `ImportError: cannot import name validate_call from pydantic`, make sure you have Pydantic 2.11+ installed:
128+
129+
```sh
130+
pip install pydantic>=2.11.0
131+
```
132+
133+
### Environment Variable Names
134+
Make sure to set your environment variables using the names expected by your code:
135+
136+
```sh
137+
export ONELOGIN_CLIENT_ID="your-client-id"
138+
export ONELOGIN_CLIENT_SECRET="your-client-secret"
139+
```
140+
141+
### API Connection Issues
142+
If you're having trouble connecting to the API, double-check:
143+
- Your OneLogin subdomain is correct in the host URL
144+
- Your API credentials have the correct scopes for the operations you're trying to perform
145+
- Your network can reach the OneLogin API endpoints

0 commit comments

Comments
 (0)