geniapi


Namegeniapi JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryPython client library for the Geni.com public REST API
upload_time2025-02-01 08:05:12
maintainerNone
docs_urlNone
authorDmitry Bryndin
requires_python>=3.10
licenseCopyright 2025 Dmitry Bryndin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords geni api client geni.com
VCS
bugtrack_url
requirements requests
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Geni: Python Client Library for Geni.com Public REST API

[![Test](https://github.com/bryndin/geni/actions/workflows/test.yaml/badge.svg)](https://github.com/bryndin/geni/actions/workflows/test.yaml)
[![codecov](https://codecov.io/gh/bryndin/geni/graph/badge.svg?token=3Z916ZHDMK)](https://codecov.io/gh/bryndin/geni)
[![Lint](https://github.com/bryndin/geni/actions/workflows/lint.yaml/badge.svg)](https://github.com/bryndin/geni/actions/workflows/lint.yaml)
[![TypeCheck](https://github.com/bryndin/geni/actions/workflows/typecheck.yaml/badge.svg)](https://github.com/bryndin/geni/actions/workflows/typecheck.yaml)

This library simplifies interaction with the [Geni.com public REST API](https://www.geni.com/platform/developer/index), enabling developers to automate various family tree management tasks or integrate Geni functionality into their Python applications. Specifically, it helps post-process your family tree after importing a GEDCOM file.


## Features
- Simplifies API interaction.
- Implements OAuth authentication flow.
- Handles Geni's required rate-limiting automatically.
- Stores API keys and tokens for ease of use.
- Provides examples for common use cases.

## Installation
Use the following command to install the library directly from GitHub:
```bash
pip install git+https://github.com/bryndin/geni.git
```

## Usage Examples
See the [examples](./examples) directory.

## Implemented Methods
The library currently supports the following methods:

* **Profile**
  - [profile](https://www.geni.com/platform/developer/help/api?path=profile): Returns information about a profile. 
  - [add-child](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-child): Add a child to a profile and return the added profile.
  - [add-parent](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-parent): Add a parent to a profile and return the added profile.
  - [add-partner](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-partner): Add a partner to a profile and return the added profile.
  - [add-sibling](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-sibling): Add a sibling to a profile and return the added profile.
  - [delete](https://www.geni.com/platform/developer/help/api?path=profile%2Fdelete): Deletes a profile.
  - [update_basics](https://www.geni.com/platform/developer/help/api?path=profile%2Fupdate-basics): Update fields on the basics and about tabs and return the changed profile. Parameters can be posted as form data or JSON.
* **Stats**
  - [stats](https://www.geni.com/platform/developer/help/api?path=stats): Returns information about the site.
  - [world_family_tree](https://www.geni.com/platform/developer/help/api?path=stats%2Fworld-family-tree): Returns information about the world family tree.
* **User**
  - [managed_profiles](https://www.geni.com/platform/developer/help/api?path=user%2Fmanaged-profiles): Returns a list of profiles the user manages.

Additional methods are planned for future releases. Contributions are welcome!

## Authentication
To interact with the Geni API, you need to authenticate using OAuth 2.0. Follow these steps:

1. Register your application at [Geni.com App Registration](https://www.geni.com/platform/developer/help/oauth_extensions).
2. Copy your API Key.
3. Make your key available in one of the following ways:
    - Store your API Key in a file named `geni_api.key` in your working directory,
      
    - or pass your API key as a parameter during the library initialization.
4. During the first run, you will be prompted to authorize your application:
   1. In the terminal window the library will give you the URL to Geni Auth page
       ```
       Visit this URL to authorize the application:
       https://www.geni.com/platform/oauth/authorize?client_id=XXXXXXXX&response_type=token&display=desktop
       Paste the redirect URL (from the address bar):
       ```
   2. Open it in any browser and authorize your application in Geni.<br>
       ![Geni Auth Page Screenshot](./docs/_static/auth_ask.png)
   3. After authorization, Geni will redirect you to a "Not Found" page. This is expected behavior. Copy the entire URL from the browser address bar and paste it in the terminal.<br>
       ![Geni Redirect URL Location Screenshot](./docs/_static/auth_redirect_url.png)
   4. The library will extract the access token from that redirected URL and save it to a temporary file `geni_token.tmp`.

5. Each subsequent request will use the access token from the temporary file, until the token expires or the file is manually removed.
6. If the access token is expired, the library will ask you to re-authenticate before continuing with the request (expiration time is also stored in the temporary file).

## Sensitive files
The library uses two files:

- **`geni_api.key`**: Created manually to store your API key.
- **`geni_token.tmp`**: Created by the library to store the temporary API access token.

Ensure these files are secured and not exposed in version control systems. These files must be manually deleted when no longer needed.

## License
This project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "geniapi",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "geni, api, client, geni.com",
    "author": "Dmitry Bryndin",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/5b/10/4759dd4b04343f367368dbecfa6739cef3b0accb45eef7edc37c22852b0c/geniapi-0.1.0.tar.gz",
    "platform": null,
    "description": "# Geni: Python Client Library for Geni.com Public REST API\n\n[![Test](https://github.com/bryndin/geni/actions/workflows/test.yaml/badge.svg)](https://github.com/bryndin/geni/actions/workflows/test.yaml)\n[![codecov](https://codecov.io/gh/bryndin/geni/graph/badge.svg?token=3Z916ZHDMK)](https://codecov.io/gh/bryndin/geni)\n[![Lint](https://github.com/bryndin/geni/actions/workflows/lint.yaml/badge.svg)](https://github.com/bryndin/geni/actions/workflows/lint.yaml)\n[![TypeCheck](https://github.com/bryndin/geni/actions/workflows/typecheck.yaml/badge.svg)](https://github.com/bryndin/geni/actions/workflows/typecheck.yaml)\n\nThis library simplifies interaction with the [Geni.com public REST API](https://www.geni.com/platform/developer/index), enabling developers to automate various family tree management tasks or integrate Geni functionality into their Python applications. Specifically, it helps post-process your family tree after importing a GEDCOM file.\n\n\n## Features\n- Simplifies API interaction.\n- Implements OAuth authentication flow.\n- Handles Geni's required rate-limiting automatically.\n- Stores API keys and tokens for ease of use.\n- Provides examples for common use cases.\n\n## Installation\nUse the following command to install the library directly from GitHub:\n```bash\npip install git+https://github.com/bryndin/geni.git\n```\n\n## Usage Examples\nSee the [examples](./examples) directory.\n\n## Implemented Methods\nThe library currently supports the following methods:\n\n* **Profile**\n  - [profile](https://www.geni.com/platform/developer/help/api?path=profile): Returns information about a profile. \n  - [add-child](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-child): Add a child to a profile and return the added profile.\n  - [add-parent](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-parent): Add a parent to a profile and return the added profile.\n  - [add-partner](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-partner): Add a partner to a profile and return the added profile.\n  - [add-sibling](https://www.geni.com/platform/developer/help/api?path=profile%252Fadd-sibling): Add a sibling to a profile and return the added profile.\n  - [delete](https://www.geni.com/platform/developer/help/api?path=profile%2Fdelete): Deletes a profile.\n  - [update_basics](https://www.geni.com/platform/developer/help/api?path=profile%2Fupdate-basics): Update fields on the basics and about tabs and return the changed profile. Parameters can be posted as form data or JSON.\n* **Stats**\n  - [stats](https://www.geni.com/platform/developer/help/api?path=stats): Returns information about the site.\n  - [world_family_tree](https://www.geni.com/platform/developer/help/api?path=stats%2Fworld-family-tree): Returns information about the world family tree.\n* **User**\n  - [managed_profiles](https://www.geni.com/platform/developer/help/api?path=user%2Fmanaged-profiles): Returns a list of profiles the user manages.\n\nAdditional methods are planned for future releases. Contributions are welcome!\n\n## Authentication\nTo interact with the Geni API, you need to authenticate using OAuth 2.0. Follow these steps:\n\n1. Register your application at [Geni.com App Registration](https://www.geni.com/platform/developer/help/oauth_extensions).\n2. Copy your API Key.\n3. Make your key available in one of the following ways:\n    - Store your API Key in a file named `geni_api.key` in your working directory,\n      \n    - or pass your API key as a parameter during the library initialization.\n4. During the first run, you will be prompted to authorize your application:\n   1. In the terminal window the library will give you the URL to Geni Auth page\n       ```\n       Visit this URL to authorize the application:\n       https://www.geni.com/platform/oauth/authorize?client_id=XXXXXXXX&response_type=token&display=desktop\n       Paste the redirect URL (from the address bar):\n       ```\n   2. Open it in any browser and authorize your application in Geni.<br>\n       ![Geni Auth Page Screenshot](./docs/_static/auth_ask.png)\n   3. After authorization, Geni will redirect you to a \"Not Found\" page. This is expected behavior. Copy the entire URL from the browser address bar and paste it in the terminal.<br>\n       ![Geni Redirect URL Location Screenshot](./docs/_static/auth_redirect_url.png)\n   4. The library will extract the access token from that redirected URL and save it to a temporary file `geni_token.tmp`.\n\n5. Each subsequent request will use the access token from the temporary file, until the token expires or the file is manually removed.\n6. If the access token is expired, the library will ask you to re-authenticate before continuing with the request (expiration time is also stored in the temporary file).\n\n## Sensitive files\nThe library uses two files:\n\n- **`geni_api.key`**: Created manually to store your API key.\n- **`geni_token.tmp`**: Created by the library to store the temporary API access token.\n\nEnsure these files are secured and not exposed in version control systems. These files must be manually deleted when no longer needed.\n\n## License\nThis project is licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.\n\n",
    "bugtrack_url": null,
    "license": "Copyright 2025 Dmitry Bryndin\n        \n        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n        \n        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n        \n        THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n        ",
    "summary": "Python client library for the Geni.com public REST API",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/bryndin/geni"
    },
    "split_keywords": [
        "geni",
        " api",
        " client",
        " geni.com"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "7aa044a9c51d0cd48f17690eff2db82afd7187c471b613370ac5fba071371806",
                "md5": "0041049f729ab3384c476595e7392fd1",
                "sha256": "9dab74c20d535bb26e11c585b8bc9a76efa5d369b98ac8e8d3bebba13897b771"
            },
            "downloads": -1,
            "filename": "geniapi-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "0041049f729ab3384c476595e7392fd1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 26089,
            "upload_time": "2025-02-01T08:05:10",
            "upload_time_iso_8601": "2025-02-01T08:05:10.941193Z",
            "url": "https://files.pythonhosted.org/packages/7a/a0/44a9c51d0cd48f17690eff2db82afd7187c471b613370ac5fba071371806/geniapi-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "5b104759dd4b04343f367368dbecfa6739cef3b0accb45eef7edc37c22852b0c",
                "md5": "a27965cdf5995f906769b46d9a74791c",
                "sha256": "2254ea85d444a8ae55012ce6fa97beade6493f2d2ae5ec47054499fc7ebdeb71"
            },
            "downloads": -1,
            "filename": "geniapi-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "a27965cdf5995f906769b46d9a74791c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 20912,
            "upload_time": "2025-02-01T08:05:12",
            "upload_time_iso_8601": "2025-02-01T08:05:12.751846Z",
            "url": "https://files.pythonhosted.org/packages/5b/10/4759dd4b04343f367368dbecfa6739cef3b0accb45eef7edc37c22852b0c/geniapi-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-01 08:05:12",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "bryndin",
    "github_project": "geni",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [
        {
            "name": "requests",
            "specs": [
                [
                    ">=",
                    "2.32.3"
                ]
            ]
        }
    ],
    "lcname": "geniapi"
}
        
Elapsed time: 0.44398s