Applifting Python task
Welcome to the Applifting Python task! To begin, please follow the steps below:
- Go through the assignment brief and read the requirements
- Request access to our service below
- Have fun :)
- Let us know once you're done
Access details
Please enter your email below. We will generate a refresh token for your application.
Hint: In case you lose the token, just enter the email that you entered before! :)
Assignment - Python SDK for Offers API
Create a production-ready Python SDK that enables developers to easily integrate with our Offers microservice to register products and retrieve offers. Offer service is provided by us, you don't need to implement it, see:
Requirements
- Create a Python SDK that wraps the Offers API.
- Provide an API to register products.
- Provide an API to retrieve offers for a product.
Data model
Product - corresponds to some imaginary product that you can buy.
id
- UUID
name
- string
description
- string
A product has many offers.
Offer - represents the product being offered for some price.
id
- UUID
price
- integer
items_in_stock
- integer
Each offer belongs to one product.
Specification
Must haves:
- Your SDK should feel intuitive and Pythonic
- Automatically handle token refresh without user intervention
- Your refresh token is tied to your email and never expires - you only need one.
- Turn your refresh token into access tokens via the auth endpoint.
- Be careful - access tokens expire.
- SDK must be async-first using async/await for API calls
- Use an HTTP client of your choice for API calls
- Full type hints throughout the codebase
- Implement comprehensive error handling with meaningful exceptions
- Write comprehensive test suite for your SDK using
pytest
.
- Add clear README with quickstart guide and examples
- Push your solution into a git repository (GitHub, GitLab, ...) and send us a link.
You can earn extra points for:
- Support for multiple HTTP clients (httpx, requests, aiohttp) with configurable backends.
- Consider adding retry logic for transient network failures with exponential backoff.
- Generate SDK methods automatically from OpenAPI specification provided above.
- Provide advanced configuration options (environment variables, config files, etc.).
- Add advanced SDK features:
- CLI companion tool for testing the SDK from command line.
- Plugin architecture for extensible request/response processing.
- Add synchronous wrapper on top of async implementation.
- Caching layer for offer data with configurable TTL.
- Request middleware hooks for logging, metrics, or custom headers.
- Batch operations for efficient handling of multiple product registrations.
- Package your SDK for distribution with proper packaging configuration.
- Demonstrate it can be built and installed locally using your preferred tool (pip, uv, poetry, etc.)
- Optionally test publishing to TestPyPI (the test instance of PyPI).
That's it! Good luck, and most importantly, have fun!