diff --git a/README.md b/README.md index 8471ea7..babb032 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A client library for accessing END PLAY Photos First, create a client: ```python -from PhotosAPI_Client import Client +from photosapi_client import Client client = Client(base_url="https://api.example.com") ``` @@ -13,7 +13,7 @@ client = Client(base_url="https://api.example.com") If the endpoints you're going to hit require authentication, use `AuthenticatedClient` instead: ```python -from PhotosAPI_Client import AuthenticatedClient +from photosapi_client import AuthenticatedClient client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSecretToken") ``` @@ -21,9 +21,9 @@ client = AuthenticatedClient(base_url="https://api.example.com", token="SuperSec Now call your endpoint and use your models: ```python -from PhotosAPI_Client.models import MyDataModel -from PhotosAPI_Client.api.my_tag import get_my_data_model -from PhotosAPI_Client.types import Response +from photosapi_client.models import MyDataModel +from photosapi_client.api.my_tag import get_my_data_model +from photosapi_client.types import Response my_data: MyDataModel = get_my_data_model.sync(client=client) # or if you need more info (e.g. status_code) @@ -33,9 +33,9 @@ response: Response[MyDataModel] = get_my_data_model.sync_detailed(client=client) Or do the same thing with an async version: ```python -from PhotosAPI_Client.models import MyDataModel -from PhotosAPI_Client.api.my_tag import get_my_data_model -from PhotosAPI_Client.types import Response +from photosapi_client.models import MyDataModel +from photosapi_client.api.my_tag import get_my_data_model +from photosapi_client.types import Response my_data: MyDataModel = await get_my_data_model.asyncio(client=client) response: Response[MyDataModel] = await get_my_data_model.asyncio_detailed(client=client) @@ -72,7 +72,7 @@ Things to know: 1. All path/query params, and bodies become method arguments. 1. If your endpoint had any tags on it, the first tag will be used as a module name for the function (my_tag above) -1. Any endpoint which did not have a tag will be in `PhotosAPI_Client.api.default` +1. Any endpoint which did not have a tag will be in `photosapi_client.api.default` ## Building / publishing this Client This project uses [Poetry](https://python-poetry.org/) to manage dependencies and packaging. Here are the basics: diff --git a/PhotosAPI_Client/__init__.py b/photosapi_client/__init__.py similarity index 100% rename from PhotosAPI_Client/__init__.py rename to photosapi_client/__init__.py diff --git a/PhotosAPI_Client/api/__init__.py b/photosapi_client/api/__init__.py similarity index 100% rename from PhotosAPI_Client/api/__init__.py rename to photosapi_client/api/__init__.py diff --git a/PhotosAPI_Client/api/default/__init__.py b/photosapi_client/api/default/__init__.py similarity index 100% rename from PhotosAPI_Client/api/default/__init__.py rename to photosapi_client/api/default/__init__.py diff --git a/PhotosAPI_Client/api/default/album_create_albums_post.py b/photosapi_client/api/default/album_create_albums_post.py similarity index 100% rename from PhotosAPI_Client/api/default/album_create_albums_post.py rename to photosapi_client/api/default/album_create_albums_post.py diff --git a/PhotosAPI_Client/api/default/album_delete_album_id_delete.py b/photosapi_client/api/default/album_delete_album_id_delete.py similarity index 100% rename from PhotosAPI_Client/api/default/album_delete_album_id_delete.py rename to photosapi_client/api/default/album_delete_album_id_delete.py diff --git a/PhotosAPI_Client/api/default/album_find_albums_get.py b/photosapi_client/api/default/album_find_albums_get.py similarity index 100% rename from PhotosAPI_Client/api/default/album_find_albums_get.py rename to photosapi_client/api/default/album_find_albums_get.py diff --git a/PhotosAPI_Client/api/default/album_patch_albums_id_patch.py b/photosapi_client/api/default/album_patch_albums_id_patch.py similarity index 100% rename from PhotosAPI_Client/api/default/album_patch_albums_id_patch.py rename to photosapi_client/api/default/album_patch_albums_id_patch.py diff --git a/PhotosAPI_Client/api/default/album_put_albums_id_put.py b/photosapi_client/api/default/album_put_albums_id_put.py similarity index 100% rename from PhotosAPI_Client/api/default/album_put_albums_id_put.py rename to photosapi_client/api/default/album_put_albums_id_put.py diff --git a/PhotosAPI_Client/api/default/login_for_access_token_token_post.py b/photosapi_client/api/default/login_for_access_token_token_post.py similarity index 100% rename from PhotosAPI_Client/api/default/login_for_access_token_token_post.py rename to photosapi_client/api/default/login_for_access_token_token_post.py diff --git a/PhotosAPI_Client/api/default/photo_delete_photos_id_delete.py b/photosapi_client/api/default/photo_delete_photos_id_delete.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_delete_photos_id_delete.py rename to photosapi_client/api/default/photo_delete_photos_id_delete.py diff --git a/PhotosAPI_Client/api/default/photo_find_albums_album_photos_get.py b/photosapi_client/api/default/photo_find_albums_album_photos_get.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_find_albums_album_photos_get.py rename to photosapi_client/api/default/photo_find_albums_album_photos_get.py diff --git a/PhotosAPI_Client/api/default/photo_get_photos_id_get.py b/photosapi_client/api/default/photo_get_photos_id_get.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_get_photos_id_get.py rename to photosapi_client/api/default/photo_get_photos_id_get.py diff --git a/PhotosAPI_Client/api/default/photo_get_token_token_photo_token_get.py b/photosapi_client/api/default/photo_get_token_token_photo_token_get.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_get_token_token_photo_token_get.py rename to photosapi_client/api/default/photo_get_token_token_photo_token_get.py diff --git a/PhotosAPI_Client/api/default/photo_move_photos_id_put.py b/photosapi_client/api/default/photo_move_photos_id_put.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_move_photos_id_put.py rename to photosapi_client/api/default/photo_move_photos_id_put.py diff --git a/PhotosAPI_Client/api/default/photo_patch_photos_id_patch.py b/photosapi_client/api/default/photo_patch_photos_id_patch.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_patch_photos_id_patch.py rename to photosapi_client/api/default/photo_patch_photos_id_patch.py diff --git a/PhotosAPI_Client/api/default/photo_upload_albums_album_photos_post.py b/photosapi_client/api/default/photo_upload_albums_album_photos_post.py similarity index 100% rename from PhotosAPI_Client/api/default/photo_upload_albums_album_photos_post.py rename to photosapi_client/api/default/photo_upload_albums_album_photos_post.py diff --git a/PhotosAPI_Client/api/default/user_confirm_users_user_confirm_get.py b/photosapi_client/api/default/user_confirm_users_user_confirm_get.py similarity index 100% rename from PhotosAPI_Client/api/default/user_confirm_users_user_confirm_get.py rename to photosapi_client/api/default/user_confirm_users_user_confirm_get.py diff --git a/PhotosAPI_Client/api/default/user_confirm_users_user_confirm_patch.py b/photosapi_client/api/default/user_confirm_users_user_confirm_patch.py similarity index 100% rename from PhotosAPI_Client/api/default/user_confirm_users_user_confirm_patch.py rename to photosapi_client/api/default/user_confirm_users_user_confirm_patch.py diff --git a/PhotosAPI_Client/api/default/user_create_users_post.py b/photosapi_client/api/default/user_create_users_post.py similarity index 100% rename from PhotosAPI_Client/api/default/user_create_users_post.py rename to photosapi_client/api/default/user_create_users_post.py diff --git a/PhotosAPI_Client/api/default/user_delete_users_me_delete.py b/photosapi_client/api/default/user_delete_users_me_delete.py similarity index 100% rename from PhotosAPI_Client/api/default/user_delete_users_me_delete.py rename to photosapi_client/api/default/user_delete_users_me_delete.py diff --git a/PhotosAPI_Client/api/default/user_me_users_me_get.py b/photosapi_client/api/default/user_me_users_me_get.py similarity index 100% rename from PhotosAPI_Client/api/default/user_me_users_me_get.py rename to photosapi_client/api/default/user_me_users_me_get.py diff --git a/PhotosAPI_Client/api/default/video_delete_videos_id_delete.py b/photosapi_client/api/default/video_delete_videos_id_delete.py similarity index 100% rename from PhotosAPI_Client/api/default/video_delete_videos_id_delete.py rename to photosapi_client/api/default/video_delete_videos_id_delete.py diff --git a/PhotosAPI_Client/api/default/video_find_albums_album_videos_get.py b/photosapi_client/api/default/video_find_albums_album_videos_get.py similarity index 100% rename from PhotosAPI_Client/api/default/video_find_albums_album_videos_get.py rename to photosapi_client/api/default/video_find_albums_album_videos_get.py diff --git a/PhotosAPI_Client/api/default/video_get_videos_id_get.py b/photosapi_client/api/default/video_get_videos_id_get.py similarity index 100% rename from PhotosAPI_Client/api/default/video_get_videos_id_get.py rename to photosapi_client/api/default/video_get_videos_id_get.py diff --git a/PhotosAPI_Client/api/default/video_move_videos_id_put.py b/photosapi_client/api/default/video_move_videos_id_put.py similarity index 100% rename from PhotosAPI_Client/api/default/video_move_videos_id_put.py rename to photosapi_client/api/default/video_move_videos_id_put.py diff --git a/PhotosAPI_Client/api/default/video_patch_videos_id_patch.py b/photosapi_client/api/default/video_patch_videos_id_patch.py similarity index 100% rename from PhotosAPI_Client/api/default/video_patch_videos_id_patch.py rename to photosapi_client/api/default/video_patch_videos_id_patch.py diff --git a/PhotosAPI_Client/api/default/video_upload_albums_album_videos_post.py b/photosapi_client/api/default/video_upload_albums_album_videos_post.py similarity index 100% rename from PhotosAPI_Client/api/default/video_upload_albums_album_videos_post.py rename to photosapi_client/api/default/video_upload_albums_album_videos_post.py diff --git a/PhotosAPI_Client/client.py b/photosapi_client/client.py similarity index 100% rename from PhotosAPI_Client/client.py rename to photosapi_client/client.py diff --git a/PhotosAPI_Client/errors.py b/photosapi_client/errors.py similarity index 100% rename from PhotosAPI_Client/errors.py rename to photosapi_client/errors.py diff --git a/PhotosAPI_Client/models/__init__.py b/photosapi_client/models/__init__.py similarity index 100% rename from PhotosAPI_Client/models/__init__.py rename to photosapi_client/models/__init__.py diff --git a/PhotosAPI_Client/models/album.py b/photosapi_client/models/album.py similarity index 100% rename from PhotosAPI_Client/models/album.py rename to photosapi_client/models/album.py diff --git a/PhotosAPI_Client/models/album_modified.py b/photosapi_client/models/album_modified.py similarity index 100% rename from PhotosAPI_Client/models/album_modified.py rename to photosapi_client/models/album_modified.py diff --git a/PhotosAPI_Client/models/body_login_for_access_token_token_post.py b/photosapi_client/models/body_login_for_access_token_token_post.py similarity index 100% rename from PhotosAPI_Client/models/body_login_for_access_token_token_post.py rename to photosapi_client/models/body_login_for_access_token_token_post.py diff --git a/PhotosAPI_Client/models/body_photo_upload_albums_album_photos_post.py b/photosapi_client/models/body_photo_upload_albums_album_photos_post.py similarity index 100% rename from PhotosAPI_Client/models/body_photo_upload_albums_album_photos_post.py rename to photosapi_client/models/body_photo_upload_albums_album_photos_post.py diff --git a/PhotosAPI_Client/models/body_user_create_users_post.py b/photosapi_client/models/body_user_create_users_post.py similarity index 100% rename from PhotosAPI_Client/models/body_user_create_users_post.py rename to photosapi_client/models/body_user_create_users_post.py diff --git a/PhotosAPI_Client/models/body_user_delete_users_me_delete.py b/photosapi_client/models/body_user_delete_users_me_delete.py similarity index 100% rename from PhotosAPI_Client/models/body_user_delete_users_me_delete.py rename to photosapi_client/models/body_user_delete_users_me_delete.py diff --git a/PhotosAPI_Client/models/body_video_upload_albums_album_videos_post.py b/photosapi_client/models/body_video_upload_albums_album_videos_post.py similarity index 100% rename from PhotosAPI_Client/models/body_video_upload_albums_album_videos_post.py rename to photosapi_client/models/body_video_upload_albums_album_videos_post.py diff --git a/PhotosAPI_Client/models/http_validation_error.py b/photosapi_client/models/http_validation_error.py similarity index 100% rename from PhotosAPI_Client/models/http_validation_error.py rename to photosapi_client/models/http_validation_error.py diff --git a/PhotosAPI_Client/models/photo.py b/photosapi_client/models/photo.py similarity index 100% rename from PhotosAPI_Client/models/photo.py rename to photosapi_client/models/photo.py diff --git a/PhotosAPI_Client/models/photo_public.py b/photosapi_client/models/photo_public.py similarity index 100% rename from PhotosAPI_Client/models/photo_public.py rename to photosapi_client/models/photo_public.py diff --git a/PhotosAPI_Client/models/photo_search.py b/photosapi_client/models/photo_search.py similarity index 100% rename from PhotosAPI_Client/models/photo_search.py rename to photosapi_client/models/photo_search.py diff --git a/PhotosAPI_Client/models/search_results_album.py b/photosapi_client/models/search_results_album.py similarity index 100% rename from PhotosAPI_Client/models/search_results_album.py rename to photosapi_client/models/search_results_album.py diff --git a/PhotosAPI_Client/models/search_results_photo.py b/photosapi_client/models/search_results_photo.py similarity index 100% rename from PhotosAPI_Client/models/search_results_photo.py rename to photosapi_client/models/search_results_photo.py diff --git a/PhotosAPI_Client/models/search_results_video.py b/photosapi_client/models/search_results_video.py similarity index 100% rename from PhotosAPI_Client/models/search_results_video.py rename to photosapi_client/models/search_results_video.py diff --git a/PhotosAPI_Client/models/token.py b/photosapi_client/models/token.py similarity index 100% rename from PhotosAPI_Client/models/token.py rename to photosapi_client/models/token.py diff --git a/PhotosAPI_Client/models/user.py b/photosapi_client/models/user.py similarity index 100% rename from PhotosAPI_Client/models/user.py rename to photosapi_client/models/user.py diff --git a/PhotosAPI_Client/models/validation_error.py b/photosapi_client/models/validation_error.py similarity index 100% rename from PhotosAPI_Client/models/validation_error.py rename to photosapi_client/models/validation_error.py diff --git a/PhotosAPI_Client/models/video.py b/photosapi_client/models/video.py similarity index 100% rename from PhotosAPI_Client/models/video.py rename to photosapi_client/models/video.py diff --git a/PhotosAPI_Client/models/video_public.py b/photosapi_client/models/video_public.py similarity index 100% rename from PhotosAPI_Client/models/video_public.py rename to photosapi_client/models/video_public.py diff --git a/PhotosAPI_Client/models/video_search.py b/photosapi_client/models/video_search.py similarity index 100% rename from PhotosAPI_Client/models/video_search.py rename to photosapi_client/models/video_search.py diff --git a/PhotosAPI_Client/py.typed b/photosapi_client/py.typed similarity index 100% rename from PhotosAPI_Client/py.typed rename to photosapi_client/py.typed diff --git a/PhotosAPI_Client/types.py b/photosapi_client/types.py similarity index 100% rename from PhotosAPI_Client/types.py rename to photosapi_client/types.py diff --git a/setup.py b/setup.py index 6ab3b23..59a290d 100644 --- a/setup.py +++ b/setup.py @@ -14,5 +14,5 @@ setup( packages=find_packages(), python_requires=">=3.7, <4", install_requires=["httpx >= 0.15.0, < 0.24.0", "attrs >= 21.3.0", "python-dateutil >= 2.8.0, < 3"], - package_data={"PhotosAPI_Client": ["py.typed"]}, + package_data={"photosapi_client": ["py.typed"]}, )