{"id":20950120,"url":"https://github.com/aeecleclair/helloassoapiwrapper","last_synced_at":"2026-02-27T11:42:26.245Z","repository":{"id":239775398,"uuid":"793739048","full_name":"aeecleclair/HelloAssoAPIWrapper","owner":"aeecleclair","description":"A fully typed Python wrapper for HelloAsso API","archived":false,"fork":false,"pushed_at":"2024-08-02T14:31:44.000Z","size":53,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-03T08:35:35.617Z","etag":null,"topics":["helloasso","pydantic","python"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/HelloAssoAPIWrapper","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aeecleclair.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-29T19:21:54.000Z","updated_at":"2024-08-09T07:39:51.000Z","dependencies_parsed_at":"2024-11-19T00:45:53.060Z","dependency_job_id":"5ac94327-aa50-4398-9a4b-dc1b9186da62","html_url":"https://github.com/aeecleclair/HelloAssoAPIWrapper","commit_stats":null,"previous_names":["aeecleclair/helloassoapiwrapper"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/aeecleclair/HelloAssoAPIWrapper","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeecleclair%2FHelloAssoAPIWrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeecleclair%2FHelloAssoAPIWrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeecleclair%2FHelloAssoAPIWrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeecleclair%2FHelloAssoAPIWrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aeecleclair","download_url":"https://codeload.github.com/aeecleclair/HelloAssoAPIWrapper/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aeecleclair%2FHelloAssoAPIWrapper/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29892304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["helloasso","pydantic","python"],"created_at":"2024-11-19T00:45:43.029Z","updated_at":"2026-02-27T11:42:26.216Z","avatar_url":"https://github.com/aeecleclair.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HelloAsso API Wrapper\n\n[![versions](https://img.shields.io/pypi/pyversions/HelloAssoAPIWrapper)](https://github.com/aeecleclair/HelloAssoAPIWrapper)\n[![license](https://img.shields.io/github/license/aeecleclair/HelloAssoAPIWrapper)](https://github.com/aeecleclair/HelloAssoAPIWrapper/blob/main/LICENSE)\n[![Pydantic v2](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/pydantic/pydantic/main/docs/badge/v2.json)](https://pydantic.dev)\n\nA fully typed Python wrapper for _HelloAsso_ API. You will find information about _HelloAsso_ on their [website](https://www.helloasso.com/) and their [API swagger documentation](https://api.helloasso.com/v5/swagger/ui/index).\n\nThe module is based on [Pydantic](https://docs.pydantic.dev/latest/) for models validation and on HelloAsso's [HaApiV5](https://github.com/HelloAsso/HaApiV5) for API calls.\n\n# Installation\n\n```bash\npip install HelloAssoAPIWrapper\n```\n\n# Usage\n\n```python\n# Import the wrapper\nfrom helloasso_api_wrapper import HelloAssoAPIWrapper\n\n# Create an instance of `HelloAssoAPIWrapper`\nhello_asso = HelloAssoAPIWrapper(\n api_base=settings.HELLOASSO_API_BASE,\n client_id=settings.HELLOASSO_CLIENT_ID,\n client_secret=settings.HELLOASSO_CLIENT_SECRET,\n timeout=60,\n)\n```\n\n## Usage example to init a checkout\n\n```python\nfrom helloasso_api_wrapper import HelloAssoAPIWrapper\nfrom helloasso_api_wrapper.exceptions import ApiV5BadRequest\n\nfrom helloasso_api_wrapper.models.carts import (\n CheckoutPayer,\n InitCheckoutBody,\n InitCheckoutResponse,\n)\n\n# First create an instance of `HelloAssoAPIWrapper` with the previous snippet\nhello_asso = HelloAssoAPIWrapper(\n api_base=settings.HELLOASSO_API_BASE,\n client_id=settings.HELLOASSO_CLIENT_ID,\n client_secret=settings.HELLOASSO_CLIENT_SECRET,\n timeout=60,\n)\n\n# Then use the wrapper to init a checkout\ninit_checkout_body = InitCheckoutBody(\n totalAmount=100, # The total amount of the checkout in cents\n initialAmount=100,\n itemName=\"Our first checkout\",\n backUrl=\"https://yourwebsite.com/callback\", # The url must use https\n errorUrl=\"https://yourwebsite.com/callback\",,\n returnUrl=\"https://yourwebsite.com/callback\",,\n containsDonation=False,\n payer=CheckoutPayer(\n firstName=\"Fabristpp\",\n lastName=\"John\",\n email=\"fabristpp@email.fr\",\n ),\n)\n\nresponse: InitCheckoutResponse\ntry:\n response = self.hello_asso.checkout_intents_management.init_a_checkout(\n helloasso_slug,\n init_checkout_body,\n )\nexcept ApiV5BadRequest as error:\n print(\"Failed to init a checkout\")\n raise error\n```\n\n# Structure of the module\n\nAuthentication is done on the background using HelloAsso's `HaApiV5` module.\n\nThe module is organized around a class [`HelloAssoAPIWrapper`](./helloasso_api_wrapper/__init__.py) containing all the methods to interact with the HelloAsso API.\n\nThis class expose multiple clients, allowing to interact with different parts of the API. All clients are located in the [`clients`](./helloasso_api_wrapper/clients) folder.\n\nPydantic models are located in the [`models`](./helloasso_api_wrapper/models) folder. Models are usually really permissive, typing all fields as Nullable. This is because the API is not always clear about the fields that are required or not. _Some assumptions are made to make the models more strict._\n\nWe expose exceptions from `HaApiV5`. You can import them directly: `from helloasso_api_wrapper.exceptions import *`\n\n# Documentation about HelloAsso API\n\nYou will find documentation about HelloAsso API endpoints on:\n\n- [HelloAsso API swagger documentation](https://api.helloasso.com/v5/swagger/ui/index)\n- [HelloAsso API documentation](https://www.helloasso.com/public-documents/documents_api/guide_utilisation_api.pdf)\n- [HelloAsso Checkout documentation](https://www.helloasso.com/public-documents/documents_api/documentation_checkout.pdf)\n\n## HelloAsso sandbox\n\nHelloAsso provide a sandbox: api.helloasso-sandbox.com to test your integration.\n\n# Notification result webhooks\n\nYou should configure a webhook to receive the notification results.\nHelloAsso will make a POST request to the URL you provided with a JSON payload corresponding to a `NotificationResultContent` object.\n\n# Development\n\nModels where first generated using HelloAsso swagger documentation, and then adapted to include additional models, use stricter types and add documentation. _Some assumptions are made to make the models more strict._\n\n## Add new methods\n\nCurrently, most endpoints are not implemented. To add a new method, you simply need to create a new method in the corresponding client. The method should use the `self.api.callAndSerialize` method to make the API call.\n\nExample for [checkout_intents_management `init_a_checkout` method](./helloasso_api_wrapper/clients/checkout_intents_management.py):\n\n```python\ndef init_a_checkout(\n self,\n organization_slug: str,\n init_checkout_body: InitCheckoutBody,\n) -\u003e InitCheckoutResponse:\n return self.api.callAndSerialize(\n f\"/organizations/{organization_slug}/checkout-intents\", # API endpoint\n InitCheckoutResponse, # Model to serialize the response\n body=init_checkout_body, # Body of the request\n method=\"POST\", # Request method\n )\n```\n\n## Models auto-generation\n\n\u003e This was used to generate the first version of the models. It should not be necessary to do it again.\n\nDownload the swagger file from the HelloAsso API documentation. It uses an old swagger 2 version. You need to convert it to OpenAPI 3.0.0 version. You can use the online tool [Swagger Editor](https://editor.swagger.io/).\n\nThen you can use the [datamodel-codegen](https://docs.pydantic.dev/latest/integrations/datamodel_code_generator/) tool to generate the models:\n\n```bash\ndatamodel-codegen --input HelloAssoV5OpenAPI.json --output HelloAssoAPIWrapper\n```\n\n# Make a release on Pypi\n\nYou need to edit HelloAssoAPIWrapper version in [helloasso_api_wrapper/\\_\\_about\\_\\_.py](./helloasso_api_wrapper/__about__.py). Then make a release on GitHub and add a tag. The tag should match v\\*.\\*.\\*.\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeecleclair%2Fhelloassoapiwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faeecleclair%2Fhelloassoapiwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faeecleclair%2Fhelloassoapiwrapper/lists"}