api.py
File containing the routes of the API.
Exception handling
Bases: HTTPException
Exception raised by the API.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
status_code |
int
|
HTTP code to return. |
required |
detail |
str
|
Error description. Defaults to |
required |
Source code in oblique/api.py
14 15 16 17 18 19 20 21 22 | |
Define the exception handler for APIException.
Source code in oblique/api.py
25 26 27 | |
Data models
Bases: BaseModel
Parameters to pass to identify a package.
- pkg_name (str): Name of the package to get.
- force_refresh (bool, optional): If set to
True, the local cache is ignored and the PyPi API is called. Note that it might be slower. Defaults toFalse.
Source code in oblique/api.py
33 34 35 36 37 38 39 40 41 42 43 | |
Routes
Route to get the informations of the package requested.
These informations are
- Last release date
- Number of versions released
- Number of versions yanked
Source code in oblique/api.py
46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | |