Package: etsy-python
Etsy API Client Library for PythonQuick LinksOverviewFeaturesRepository StructureModulesGetting StartedInstallationContributingLicenseOverviewThe etsy-python-sdk is a project that provides a Python wrapper for the Etsy API, allowing developers to easily interact with the Etsy platform. With features such as OAuth authentication, users can authenticate and access the API to perform actions like retrieving listings, managing inventory, and creating shipping profiles. This project simplifies the process of integrating Etsy functionality into Python applications, enabling developers to build applications that interact with the Etsy marketplace seamlessly.FeaturesFeatureDescription⚙️ArchitectureThe project's architecture is not explicitly mentioned in the repository. More information would be required to provide a detailed analysis.🔩Code QualityThe code quality and style are not explicitly mentioned in the repository. No linting or code analysis tools are mentioned.📄DocumentationThe extent and quality of documentation are not explicitly mentioned in the repository. No specific documentation files or guidelines are provided.🔌IntegrationsThe project has dependencies on the following libraries: requests, requests-oauthlib. These libraries are used for making HTTP requests and OAuth authentication.🧩ModularityThe modularity and reusability of the codebase cannot be determined based on the repository's contents and information available.⚡️PerformanceThe efficiency, speed, and resource usage of the project cannot be evaluated based on the repository's contents and information available.🛡️SecurityThe measures used for data protection and access control are not explicitly mentioned in the repository. Further information would be required for a detailed assessment.📦DependenciesThe key external libraries and dependencies include requests and requests-oauthlib. These are required for making HTTP requests and implementing OAuth authentication.🚀ScalabilityThe ability of the project to handle increased traffic and load cannot be determined based on the repository's contents and information available.Repository Structure└──etsy-python-sdk/└──etsy_python├──requirements.txt└──v3├──auth├──common├──enums├──exceptions├──models└──resourcesModulesetsy_pythonFileSummaryrequirements.txtThis code snippet, located in therequirements.txtfile, specifies the dependencies required for the Etsy Python SDK. It includes therequestslibrary andrequests-oauthlib, which are critical for making API requests to the Etsy platform.etsy_python.v3.enumsFileSummaryListingInventory.pyTheListingInventory.pyfile in theenumsdirectory of theetsy-python-sdkrepository defines theIncludesenum, which represents the different options for including listing information in the inventory.Language.pyThe Language.py file in the enums directory of the etsy-python-sdk repository defines an Enum class representing different languages. It provides a set of predefined language options as constants.ShippingProfile.pyThis code snippet, located at etsy_python/v3/enums/ShippingProfile.py, defines various enums related to shipping profiles in the parent repository. These enums include processing time units, destination regions, shipping types, and providers.ShopReceipt.pyThe code snippet in the ShopReceipt.py file defines two enums, SortOn and SortOrder, which are used for sorting shop receipts in ascending or descending order based on different criteria. This code snippet is part of the Etsy Python SDK repository and resides in the enums directory of the v3 module.Listing.pyThe code snippet inListing.pydefines several enums used in the parentetsy-python-sdkrepository, such asWhoMade,WhenMade,ItemWeightUnit, and others. These enums provide standardized values for various attributes of a listing in the Etsy marketplace.etsy_python.v3.resourcesFileSummaryResponse.pyThe code snippet inResponse.pydefines aResponseclass that represents a response from the Etsy API. It includes the response code, message, and optional rate limits. The__str__method provides a string representation of the response.UserAddress.pyThis code snippet is part of the etsy-python-sdk repository and is located at etsy_python/v3/resources/UserAddress.py. It provides methods for interacting with user addresses, including deleting an address, getting a specific address, and retrieving a list of addresses. The code relies on the EtsyClient session and makes use of the make_request method.Session.pyTheSession.pycode snippet in thev3/resourcesdirectory of theetsy-python-sdkrepository implements aEtsyClientclass that handles authentication, token management, and making HTTP requests to the Etsy API. It provides methods for updating tokens, making requests, and processing responses.ShopSection.pyTheShopSectionResourcecode snippet is a module within theetsy-python-sdkrepository. It provides functions to create, retrieve, update, and delete shop sections in the Etsy API. It utilizes theEtsyClientsession to make requests and handles possible exceptions.PaymentLedgerEntry.pyThis code snippet, located atetsy_python/v3/resources/PaymentLedgerEntry.py, is responsible for handling payment ledger entries in the Etsy Python SDK repository. It provides methods to retrieve specific ledger entries for a shop and to retrieve a list of ledger entries for a shop within a specific time range. The code interacts with theEtsyClientsession and returns either a successfulResponseor aRequestExceptionif an error occurs.User.pyThe UserResource class in User.py is responsible for retrieving user information from the Etsy API. It utilizes the EtsyClient session to make the API requests and returns a response or an exception.ReceiptTransactions.pyThe code in ReceiptTransactions.py is responsible for retrieving information about shop receipt transactions from the Etsy API. It provides methods to get transactions related to a listing, a specific receipt, a specific transaction, and all transactions for a shop. The code interacts with the API using the EtsyClient session and handles the request and response handling through the make_request method.ListingOffering.pyThis code snippet is part of the Etsy Python SDK repository and is located in the ListingOffering.py file. It defines a ListingOfferingResource class that interacts with the Etsy API to retrieve a specific listing offering. It utilizes session and response objects to make the API request.ShopProductionPartner.pyThe code snippet in ShopProductionPartner.py is a resource class that interacts with the production partners of a shop in the Etsy Python SDK. It provides a method to retrieve the production partners of a shop using the Etsy API.ListingInventory.pyTheListingInventory.pycode snippet in theetsy-python-sdkrepository is responsible for managing listings' inventory. It provides functions to retrieve and update listing inventory using the Etsy API. It utilizes dataclasses, typing, and other resources from the parent repository.ListingImage.pyThis code snippet defines a ListingImageResource class in the Etsy Python SDK. It provides methods for interacting with listing images in the Etsy API, such as deleting, getting, and uploading images. The class encapsulates the necessary logic for making requests to the API using the provided EtsyClient session.Shop.pyThis code snippet in Shop.py defines a ShopResource class that provides methods for interacting with the Etsy API to get, update, find shops, and get shops by owner user ID. It relies on the EtsyClient session to make API requests with appropriate endpoints and parameters.Receipt.pyThe ReceiptResource code snippet in the Etsy Python SDK repository provides methods for interacting with shop receipts. It allows users to retrieve, update, and create shipments for receipts. This code plays a critical role in managing the receipt-related functionality of the application.ShopReturnPolicy.pyThis code snippet represents the ShopReturnPolicy resource in the Etsy Python SDK. It provides methods for creating, updating, retrieving, and deleting shop return policies. It communicates with the Etsy API using the EtsyClient session.Taxonomy.pyThis code snippet contains two classes, BuyerTaxonomy and SellerTaxonomy, which are responsible for making API requests related to buyer and seller taxonomies, respectively. These classes utilize the EtsyClient session object to interact with the API endpoints and retrieve taxonomic data.ListingVariationImages.pyThis code snippet, located at etsy_python/v3/resources/ListingVariationImages.py, is responsible for handling listing variation images in the Etsy Python SDK. It provides functions to get and update variation images for a listing. The code interacts with the Etsy API through a session and uses dataclasses and typing for proper type annotations.ShippingProfile.pyTheShippingProfileResourceclass in theShippingProfile.pyfile is responsible for interacting with the shipping profile endpoints of the Etsy API. It provides methods for creating, updating, deleting, and retrieving shipping profiles and their destinations and upgrades. The class uses theEtsyClientsession to make requests to the API.ListingVideo.pyThis code snippet provides a ListingVideoResource class that interacts with the Etsy API. It allows for deleting, getting, and uploading videos associated with listings. It uses the EtsyClient session for making API requests.ListingProduct.pyThis code snippet is a resource file in the etsy-python-sdk repository's v3 package. It provides a method to retrieve a specific product for a listing by making a request to the Etsy API. The code uses dataclasses and types to handle the response and any potential exceptions.ListingTranslation.pyThis code snippet in ListingTranslation.py provides functions to create, retrieve, and update listing translations in the Etsy Python SDK. It communicates with the Etsy API using theEtsyClientsession and handles requests and responses, encapsulating the logic for listing translation operations.ListingFile.pyThis code snippet in ListingFile.py is part of the etsy-python-sdk repository. It provides functions to interact with listing files in the Etsy API, including deleting, getting, getting all, and uploading listing files. The code relies on the EtsyClient class and various other modules within the repository.Payment.pyThePaymentResourceclass inPayment.pyis responsible for handling payments-related operations in the Etsy Python SDK. It provides methods to retrieve shop payment account ledger entries, shop payments by receipt ID, and individual payments by ID. These methods make requests to the Etsy API using the provided session.Review.pyTheReviewResourceclass in theReview.pyfile is part of theetsy-python-sdkrepository. It provides methods to retrieve reviews either by listing or by shop. The class takes a session object as a parameter and uses it to make API requests.Listing.pyThe code snippet inListing.pyis responsible for managing and interacting with the Listing resource in the Etsy API. It provides functions to create, retrieve, update, and delete listings, as well as perform various operations related to listings, such as getting listings by shop, by IDs, by shop section, and by return policy. The code demonstrates proper resource structuring and implements error handling for making requests to the Etsy API.Miscellaneous.pyThis code snippet inMiscellaneous.pydefines aMiscellaneousResourceclass that represents a resource for making various API requests. It includes methods for pinging the server and getting token scopes. The class uses a session object to make the requests.etsy_python.v3.resources.enumsFileSummaryRequest.pyThe code snippet inRequest.pydefines an enumeration of HTTP methods (GET,POST,PUT, etc.) used for making API requests. It is part of theetsy-python-sdkrepository and is located in theenumsmodule within thev3package of the codebase.RateLimit.pyThe code snippet in the file RateLimit.py defines a data class called RateLimit that represents rate limit information. It includes attributes such as limit per second, remaining requests this second, limit per day, and remaining requests today. This class is part of the enums module in the larger etsy-python-sdk repository.etsy_python.v3.commonFileSummaryRequest.pyThe code snippet in the fileRequest.pydefines a set of error codes and default response messages used in the common module of theetsy-python-sdkrepository. It provides a standardized way of handling HTTP responses.Utils.pyThis code snippet inetsy_python/v3/common/Utils.pyprovides utility functions for the Etsy Python SDK. It includes functions to generate a URI with query parameters, convert objects to dictionaries, and read bytes from a file. These functions are critical for various operations within the repository's architecture.Env.pyThis code snippet defines the environment configuration for the Etsy Python SDK. It sets the authorization and request URLs based on the environment (production in this case).etsy_python.v3.authFileSummaryOAuth.pyThe code snippet in the file OAuth.py in the auth directory of the etsy-python-sdk repository handles OAuth authentication for the Etsy API. It allows users to obtain an authorization code, set the code, and retrieve an access token. The code also generates a challenge for the code verifier.etsy_python.v3.exceptionsFileSummaryBaseAPIException.pyThe code snippet in BaseAPIException.py defines a base class for API exceptions in the etsy-python-sdk repository. It includes properties for code, message, and type, and overrides thestrmethod to display the exception details.RequestException.pyThis code snippet in the file RequestException.py is a data class that represents a RequestException in the Etsy Python SDK repository. It inherits from the BaseAPIException class and includes a rate_limits attribute. Thestr() method overrides the parent class method to provide a formatted string representation of the exception.etsy_python.v3.modelsFileSummaryRequest.pyThe Request.py code snippet in the etsy-python-sdk repository defines a class that represents a request object. It has methods to check for mandatory fields, get nullable fields, and convert the object to a dictionary.Shop.pyThe code snippet in the Shop.py file defines request models for creating and updating shop sections, and for updating shop details. The models specify the mandatory and nullable fields required for each request. These models are used in the Etsy Python SDK repository to handle requests related to shop management.Product.pyThis code snippet defines theProductdata model in theetsy-python-sdkrepository. It includes properties likesku,property_values, andofferings. These models are used for handling product-related data in the Etsy API integration.Receipt.pyThis code snippet contains the implementation of two request models, namelyCreateReceiptShipmentRequestandUpdateShopReceiptRequest, which are used in the Etsy Python SDK repository. These models define the attributes and behavior required for creating and updating receipts in the Etsy platform.ShopReturnPolicy.pySummary:The code in ShopReturnPolicy.py defines three request classes: ConsolidateShopReturnPoliciesRequest, CreateShopReturnPolicyRequest, and UpdateShopReturnPolicyRequest. These classes inherit from the Request class and contain attributes related to shop return policies, such as acceptance of returns and exchanges.ShippingProfile.pyThe code snippet inShippingProfile.pydefines classes for creating and updating shipping profiles in the Etsy Python SDK. These classes handle requests related to shipping profiles, including destination information and profile upgrades. They ensure the required and optional parameters are included in the requests.FileRequest.pyTheFileRequestclass in theFileRequest.pyfile is a subclass of theRequestclass. It handles file-related requests by accepting optional lists of nullable and mandatory fields. The class initializes thefileanddataattributes and calls the parent class constructor. This code snippet contributes to the model layer of the etsy-python-sdk repository, providing functionality for handling file requests.Utils.pyThis code snippet defines data classes for offerings, property values, and variation images. These classes are utilized in theetsy-python-sdkrepository's architecture for managing and manipulating data related to offerings, properties, and variation images in the Etsy e-commerce platform.Listing.pyThis code snippet defines various request models for creating, updating, and managing listings in the Etsy Python SDK. It includes models for creating draft listings, updating listing properties, uploading images and files, and managing variations and translations for listings.Miscellaneous.pyThe code snippet in the file Miscellaneous.py defines a class called GetTokenScopes. It inherits from the Request class and is used to retrieve the scopes of a token. The class has a token parameter and handles the nullable and mandatory fields required for the request.Getting StartedRequirementsEnsure you have the following dependencies installed on your system:Python:version 3.8+InstallationClone the etsy-python-sdk repository:gitclonehttps://github.com/amitray007/etsy-python-sdkChange to the project directory:cdetsy-python-sdkInstall the dependencies:pipinstall-rrequirements.txtContributingContributions are welcome! Here are several ways you can contribute:Report Issues: Submit bugs found or log feature requests for Etsy-python-sdk.Contributing GuidelinesFork the Repository: Start by forking the project repository to your GitHub account.Clone Locally: Clone the forked repository to your local machine using a Git client.gitclonehttps://github.com/amitray007/etsy-python-sdkCreate a New Branch: Always work on a new branch, giving it a descriptive name.gitcheckout-bnew-feature-xMake Your Changes: Develop and test your changes locally.Commit Your Changes: Commit with a clear message describing your updates.gitcommit-m'Implemented new feature x.'Push to GitHub: Push the changes to your forked repository.gitpushoriginnew-feature-xSubmit a Pull Request: Create a PR against the original project repository. Clearly describe the changes and their motivations.Once your PR is reviewed and approved, it will be merged into the main branch.LicenseThis project is protected under theMIT LicenseLicense.