{"id":21189,"library":"easypost","title":"EasyPost","description":"EasyPost Shipping API Client Library for Python. Current version 10.6.0. Supports Python >=3.9. Released regularly with new features and bug fixes.","status":"active","version":"10.6.0","language":"python","source_language":"en","source_url":"https://github.com/EasyPost/easypost-python","tags":["shipping","api-client","carrier","label","tracking"],"install":[{"cmd":"pip install easypost","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"Client is not directly importable; use easypost.Client or create client with API key.","wrong":"from easypost import Client","symbol":"Client","correct":"import easypost\nclient = easypost.Client('API_KEY')"},{"note":"The package is 'easypost', not 'easypostv2' even if some docs reference it.","wrong":"import easypostv2","symbol":"easypost","correct":"import easypost"}],"quickstart":{"code":"import easypost\n\nclient = easypost.Client(os.environ.get('EASYPOST_API_KEY', ''))\n\n# Create an address\naddress = client.address.create(\n    street1=\"417 MONTGOMERY ST\",\n    street2=\"FLOOR 5\",\n    city=\"SAN FRANCISCO\",\n    state=\"CA\",\n    zip=\"94104\",\n    country=\"US\",\n    company=\"EasyPost\",\n    phone=\"415-123-4567\"\n)\n\nprint(address)\n","lang":"python","description":"Create a client and an address."},"warnings":[{"fix":"Use `import easypost; client = easypost.Client('YOUR_API_KEY')` and pass this client to all service calls.","message":"v10.0.0 drops support for Python 3.7 and 3.8. Also changed the client instantiation pattern; old `import easypost; easypost.api_key = '...'` no longer works. You must use `client = easypost.Client('API_KEY')` or set `easypost.api_key` only for backwards compatibility (deprecated).","severity":"breaking","affected_versions":">=10.0.0"},{"fix":"Use client-based calls such as `client.address.create(...)`.","message":"Setting `easypost.api_key` globally is deprecated as of v10.0.0. Methods that relied on the global key (e.g., `easypost.Address.create(...)`) will raise errors in future versions.","severity":"deprecated","affected_versions":">=10.0.0"},{"fix":"Create a client and use `client.<resource>.<method>(...)`.","message":"All service methods are now called on the client object, not as top-level functions. For example, `easypost.Shipment.create(...)` is wrong; use `client.shipment.create(...)`.","severity":"gotcha","affected_versions":">=10.0.0"},{"fix":"Catch `easypost.errors.RateLimitError` and retry after a delay.","message":"Rate limiting: EasyPost returns 429 errors when too many requests are made. The library does not automatically retry; you must implement retries with exponential backoff.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use `client.address.create(...)` instead of `easypost.Address.create(...)`.","cause":"In v10, top-level resource classes (e.g., `easypost.Address`) have been removed. All operations are via client services.","error":"AttributeError: module 'easypost' has no attribute 'Address'"},{"fix":"Use `client = easypost.Client('EASYPOST_API_KEY')` with only the key as a string.","cause":"You attempted to pass both API key and another argument incorrectly, or used old `easypost.Client('key', ...)` with extra args.","error":"TypeError: Client() takes 1 positional argument but 2 were given"},{"fix":"Set the API key either via `client = easypost.Client('YOUR_KEY')` or set environment variable `EASYPOST_API_KEY` and call `client = easypost.Client()`.","cause":"You tried to make an API call without providing an API key, or the client was not instantiated properly.","error":"easypost.errors.InvalidRequestError: Missing required parameter: 'api_key'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}