mirror of
https://github.com/skoobasteeve/successfactors-python.git
synced 2026-03-20 11:38:58 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e6d16cb6b1 | ||
|
|
7f175514e6 | ||
|
|
3fcd1ae4c6 | ||
|
|
416f287ddc |
3
.github/workflows/python-publish.yml
vendored
3
.github/workflows/python-publish.yml
vendored
@@ -11,6 +11,7 @@ name: Upload Python Package
|
|||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
@@ -33,7 +34,7 @@ jobs:
|
|||||||
- name: Build package
|
- name: Build package
|
||||||
run: python -m build
|
run: python -m build
|
||||||
- name: Publish package
|
- name: Publish package
|
||||||
uses: pypa/gh-action-pypi-publish@v1
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
with:
|
with:
|
||||||
user: __token__
|
user: __token__
|
||||||
password: ${{ secrets.PYPI_API_TOKEN }}
|
password: ${{ secrets.PYPI_API_TOKEN }}
|
||||||
|
|||||||
14
README.md
14
README.md
@@ -1,6 +1,16 @@
|
|||||||
# SuccessFactors Auth
|
# SuccessFactors Auth
|
||||||
Authenticate with the SAP SuccessFactors API with OAuth2 and Python.
|
Authenticate with the SAP SuccessFactors API with OAuth2 and Python.
|
||||||
|
|
||||||
|
## Dependencies
|
||||||
|
|
||||||
|
- xmlsec
|
||||||
|
- requests
|
||||||
|
|
||||||
|
## System Requirements
|
||||||
|
|
||||||
|
- libxml2 >= 2.9.1
|
||||||
|
- libxmlsec1 >= 1.2.18
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
|
|
||||||
1. Create an OAuth application in SuccessFactors.
|
1. Create an OAuth application in SuccessFactors.
|
||||||
@@ -9,8 +19,10 @@ Authenticate with the SAP SuccessFactors API with OAuth2 and Python.
|
|||||||
``` shell
|
``` shell
|
||||||
pip install successfactors_auth
|
pip install successfactors_auth
|
||||||
```
|
```
|
||||||
|
Depending on your OS, you may need to install additional system packages, see [xmlsec documentation](https://pypi.org/project/xmlsec/).
|
||||||
|
**Note for macOS users:** There is a bug that prevents you from installing xmlsec with Homebrew, currently tracked in a [Github issue](https://github.com/xmlsec/python-xmlsec/issues/254). There are some workaround you can try, but in the mean time it may be easier to install within a container or VM.
|
||||||
4. Import `successfactors_auth` into your Python >=3.9 project.
|
4. Import `successfactors_auth` into your Python >=3.9 project.
|
||||||
5. Call the `successfactors_auth.auth()` function in your Python project. You'll need to pass the following parameters:
|
5. Call the `successfactors_auth.get_token()` function in your Python project. You'll need to pass the following parameters:
|
||||||
- `sf_url`: Base API url of your SuccessFactors instance, e.g. "https://api55.sapsf.eu".
|
- `sf_url`: Base API url of your SuccessFactors instance, e.g. "https://api55.sapsf.eu".
|
||||||
- `sf_company_id`: SuccessFactors company ID.
|
- `sf_company_id`: SuccessFactors company ID.
|
||||||
- `sf_oauth_client_id`: The Client ID for the OAuth application you created earlier.
|
- `sf_oauth_client_id`: The Client ID for the OAuth application you created earlier.
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|||||||
|
|
||||||
[project]
|
[project]
|
||||||
name = "successfactors-auth"
|
name = "successfactors-auth"
|
||||||
version = "0.0.9"
|
version = "0.0.10"
|
||||||
authors = [
|
authors = [
|
||||||
{ name="Ray Lyon", email="ray@raylyon.net" },
|
{ name="Ray Lyon", email="ray@raylyon.net" },
|
||||||
]
|
]
|
||||||
|
|||||||
Reference in New Issue
Block a user