octo-api
Python interface to the Octopus Energy API.
Docs |
|
---|---|
Tests |
|
PyPI |
|
Activity |
|
QA |
|
Other |
Installation
python3 -m pip install octo-api --user
python3 -m pip install git+https://github.com/domdfcoding/octo-api@master --user
octo_api.api
The primary interface to the Octopus Energy API.
Note
The Octopus Energy API uses the term “Grid Supply Point” (GSP) to refer to what are actually the 14 former Public Electricity Suppliers. The GSP terminology has been used here to better reflect the REST API.
Classes:
|
The primary interface to the Octopus Energy API. |
-
class
OctoAPI
(api_key)[source] Bases:
object
The primary interface to the Octopus Energy API.
- Parameters
api_key (
str
) – API key to access the Octopus Energy API.
If you are an Octopus Energy customer, you can generate an API key from your online dashboard.
Attributes:
The base URL of the Octopus Energy API.
The API key to access the Octopus Energy API.
Methods:
get_consumption
(mpan, serial_number, fuel[, …])Return a list of consumption values for half-hour periods for a given meter-point and meter.
get_grid_supply_point
(postcode)Returns the grid supply point for the given postcode.
get_meter_point_details
(mpan)Retrieve the details of a meter-point.
get_product_info
(product_code[, …])Retrieve the details of a product (including all its tariffs) for a particular point in time.
get_products
([is_variable, is_green, …])Returns a list of energy products.
get_tariff_charges
(product_code, …[, …])Returns a list of time periods and their associated unit rates charges.
-
API_BASE
Type:
SlumberURL
The base URL of the Octopus Energy API.
-
get_consumption
(mpan, serial_number, fuel, period_from=None, period_to=None, page_size=100, reverse=False, group_by=None)[source] Return a list of consumption values for half-hour periods for a given meter-point and meter.
Unit of measurement:
Electricity meters: kWh
SMETS1 Secure gas meters: kWh
SMETS2 gas meters: m3
Attention
Half-hourly consumption data is only available for smart meters. Requests for consumption data for non-smart meters will return an empty response payload.
- Parameters
mpan (
str
) – The electricity meter-point’s MPAN or gas meter-point’s MPRN.serial_number (
str
) – The meter’s serial number.fuel (
Literal
['electricity'
,'gas'
])period_from (
Optional
[datetime
]) – Show consumption for periods which start at or after the given datetime. This parameter can be provided on its own. DefaultNone
.period_to (
Optional
[datetime
]) – Show consumption for periods which start at or before the given datetime. This parameter also requires providing theperiod_from
parameter to create a range. DefaultNone
.page_size (
int
) – Page size of returned results. Default is100
, maximum is25,000
to give a full year of half-hourly consumption details.reverse (
bool
) – Returns the results ordered from most oldest to newest. By default the results are from most recent backwards.The grouping of the consumption data. By default the consumption is returned in half-hour periods.
Possible alternatives are:
'hour'
'day'
'week'
'month'
'quarter'
- Return type
-
get_grid_supply_point
(postcode)[source] Returns the grid supply point for the given postcode.
- Parameters
postcode (
str
)- Raises
ValueError
if the postcode cannot be mapped to a GSP.- Return type
-
get_meter_point_details
(mpan)[source] Retrieve the details of a meter-point.
This can be used to get the GSP of a given meter-point.
- Parameters
mpan (
str
) – The electricity meter-point’s MPAN.- Return type
- Returns
-
get_product_info
(product_code, tariffs_active_at=None)[source] Retrieve the details of a product (including all its tariffs) for a particular point in time.
- Parameters
Example
>>> api.get_product_info(product_code='VAR-17-01-11') octo_api.products.DetailedProduct( available_from='2017-01-11T10:00:00+00:00', available_to='2018-02-15T00:00:00+00:00', brand='S_ENERGY', code='7-01-11', description='This variable tariff always offers great value - driven by our' 'belief that prices should be fair for the long term, not just a' 'fixed term. We aim for 50% renewable electricity on this tariff.', display_name='pus', full_name='ctopus January 2017 v1', is_business=False, is_green=False, is_prepay=False, is_restricted=False, is_tracker=False, is_variable=True, links=[ { 'href': 'https://api.octopus.energy/v1/products/VAR-17-01-11/', 'method': 'GET', 'rel': 'self' } ], term=None, tariffs_active_at='2020-10-26T11:15:17.208285+00:00', single_register_electricity_tariffs=RegionalTariffs(['direct_debit_monthly']), dual_register_electricity_tariffs=RegionalTariffs(['direct_debit_monthly']), single_register_gas_tariffs=RegionalTariffs(['direct_debit_monthly']), sample_quotes=RegionalQuotes([dual_fuel_dual_rate, dual_fuel_single_rate, electricity_dual_rate, electricity_single_rate]), sample_consumption={ 'electricity_single_rate': {'electricity_standard': 2900}, 'electricity_dual_rate': { 'electricity_day': 2436, 'electricity_night': 1764 }, 'dual_fuel_single_rate': { 'electricity_standard': 2900, 'gas_standard': 12000 }, 'dual_fuel_dual_rate': { 'electricity_day': 2436, 'electricity_night': 1764, 'gas_standard': 12000 } }, )
- Return type
-
get_products
(is_variable=None, is_green=None, is_tracker=None, is_prepay=None, is_business=False, available_at=None)[source] Returns a list of energy products.
By default, the results only include public energy products. Authenticated organisations will also see products available to their organisation.
- Parameters
is_variable (
Optional
[bool
]) – Show only variable products. DefaultNone
.is_green (
Optional
[bool
]) – Show only green products. DefaultNone
.is_tracker (
Optional
[bool
]) – Show only tracker products. DefaultNone
.is_prepay (
Optional
[bool
]) – Show only pre-pay products. DefaultNone
.is_business (
bool
) – Show only business products. DefaultFalse
.available_at (
Optional
[datetime
]) – Show products available for new agreements on the given datetime. Defaults to the current datetime, effectively showing products that are currently available.
Example
>>> api.get_products()[0] octo_api.products.Product( available_from='2016-01-01T:00:00:00+00:00', available_to=None, brand='AFFECT_ENERGY', code='1201', description='Affect Standard Tariff', display_name='Affect Standard Tariff', full_name='Affect Standard Tariff', is_business=False, is_green=False, is_prepay=False, is_restricted=False, is_tracker=False, is_variable=True, links=[ { 'href': 'https://api.octopus.energy/v1/products/1201/', 'method': 'GET', 'rel': 'self' } ], term=None, direction='IMPORT', )
- Return type
-
get_tariff_charges
(product_code, tariff_code, fuel, rate_type, period_from=None, period_to=None, page_size=100)[source] Returns a list of time periods and their associated unit rates charges.
If the tariff has a fixed unit rate the list will only contain one element.
- Parameters
product_code (
str
) – The code of the product to be retrieved, for exampleVAR-17-01-11
.tariff_code (
str
) –The code of the tariff to be retrieved, for example
E-1R-VAR-17-01-11-A
. From what I can tell the format is:<E for electricity><optional hyphen><1R for single rate?><the product code>-<the grid supply point>
fuel (
Literal
['electricity'
,'gas'
])rate_type (
RateType
)period_from (
Optional
[datetime
]) – Show charges active from the given datetime (inclusive). This parameter can be provided on its own. DefaultNone
.period_to (
Optional
[datetime
]) – Show charges active up to the given datetime (exclusive). You must also provide theperiod_from
parameter in order to create a range. DefaultNone
.page_size (
int
) – Page size of returned results. Default is100
, maximum is1,500
to give up to a month of half-hourly prices.
Note
If you’re using this API to query future unit-rates of the Agile Octopus product, note that day-ahead prices are normally created by 4pm in the Europe/London timezone. Further, the market index used to calculate unit rates is based in the CET timezone (UTC+1) and so its “day” corresponds to 11pm to 11pm in UK time. Hence, if you query today’s unit rates before 4pm, you’ll get 46 results back rather than 48.
- Return type
octo_api.consumption
Class to represent consumption data.
Classes:
|
Represents the consumption for a given period of time. |
-
class
Consumption
(consumption, interval_start, interval_end)[source] Bases:
object
Represents the consumption for a given period of time.
- Parameters
Attributes:
The consumption.
The end of the time period.
The start of the time period.
Methods:
from_dict
(d)Construct an instance of
Consumption
from a dictionary.to_dict
([convert_values])Returns a dictionary containing the contents of the
Consumption
object.-
classmethod
from_dict
(d) Construct an instance of
Consumption
from a dictionary.
-
to_dict
(convert_values=False) Returns a dictionary containing the contents of the
Consumption
object.
octo_api.pagination
Class for handling paginated API responses.
Classes:
|
|
|
Represents a multi-page response from a REST API. |
-
typeddict
OctoResponse
[source] Bases:
TypedDict
TypedDict
representing the raw JSON data returned by the Octopus Energy API.
-
class
PaginatedResponse
(query_url, query_params=None, obj_type=<class 'dict'>)[source] Bases:
Iterable
[~_T
]Represents a multi-page response from a REST API.
The items within the response can be iterated over or accessed by their indices. The total number of items can be accessed with
len(response)
.- Parameters
query_url (
SlumberURL
) – The initial query URL.query_params (
Optional
[MutableMapping
[str
,Any
]]) – The parameters to the query. DefaultNone
.obj_type (
Type
) – The object to convert the response data to. Defaultdict
.
Note
This class assumes the JSON response is in the format used by Django REST framework.
The response should be in the following format:
{ "count": 1023, "next": "https://api.example.org/accounts/?page=5", "previous": "https://api.example.org/accounts/?page=3", "results": [] }
See https://www.django-rest-framework.org/api-guide/pagination/ for more information.
Methods:
__eq__
(other)Return
self == other
.__getitem__
(item)Returns the item or items in the
PaginatedResponse
, as given by the index or slice.__iter__
()Iterate over items in the
PaginatedResponse
.__len__
()Returns the number of items in the
PaginatedResponse
.-
__getitem__
(item)[source] Returns the item or items in the
PaginatedResponse
, as given by the index or slice.- Parameters
- Return type
- Overloads
__getitem__
(item:int
) ->~_T
__getitem__
(item:slice
) ->List
[~_T
]
-
__iter__
()[source] Iterate over items in the
PaginatedResponse
.- Return type
Iterator
[~_T
]
-
__len__
()[source] Returns the number of items in the
PaginatedResponse
.- Return type
octo_api.products
Classes to model products and tariffs.
Classes:
|
Represents an Octopus Energy product. |
|
Represents an Octopus Energy product. |
|
Represents an Octopus Energy product, with detailed tariff information. |
|
Represents a tariff for a product. |
|
Represents the unit rate of a tariff at a particular period in time. |
Mapping of GSP regions to a mapping of payment methods to |
|
|
Mapping of GSP regions to a mapping of payment methods to a mapping of fuel types to |
-
class
BaseProduct
(available_from, available_to, brand, code, description, display_name, full_name, is_business, is_green, is_prepay, is_restricted, is_tracker, is_variable, links, term)[source] Bases:
object
Represents an Octopus Energy product.
- Parameters
available_from (
Union
[str
,datetime
,None
]) – The date from which the product is available.available_to (
Union
[str
,datetime
,None
]) – The date until which the product is available.brand (
str
) – The brand under which the product is sold.code (
str
) – The tariff code.description (
str
) – A description of the product.display_name (
str
) – The display name of the product.full_name (
str
) – The name of the product.is_business (
bool
) – Whether the product is for businesses.is_green (
bool
) – Whether the product is green.is_prepay (
bool
) – Whether the product is prepay.is_restricted (
bool
) – Whether the product is restricted.is_tracker (
bool
) – Whether the product tracks the wholesale electricity rate.is_variable (
bool
) – Whether the product has a variable tariff.links (
Iterable
[MutableMapping
[str
,Any
]]) – Links associated with this product.term (
Optional
[int
]) – The number of months that a product lasts for if it is fixed length.
Attributes:
The date from which the product is available.
The date until which the product is available.
The brand under which the product is sold.
The code of the product.
A description of the product.
The display name of the product.
The name of the product.
Whether the product is for businesses.
Whether the product is green.
Whether the product is prepay.
Whether the product is restricted.
Whether the product tracks the wholesale electricity rate.
Whether the product has a variable tariff.
Links associated with this product.
The number of months that a product lasts for if it is fixed length.
Methods:
from_dict
(d)Construct an instance of
BaseProduct
from a dictionary.to_dict
([convert_values])Returns a dictionary containing the contents of the
BaseProduct
object.-
classmethod
from_dict
(d) Construct an instance of
BaseProduct
from a dictionary.
-
links
Type:
List
[MutableMapping
[str
,Any
]]Links associated with this product.
-
to_dict
(convert_values=False) Returns a dictionary containing the contents of the
BaseProduct
object.
-
class
Product
(available_from, available_to, brand, code, description, display_name, full_name, is_business, is_green, is_prepay, is_restricted, is_tracker, is_variable, links, term, direction)[source] Bases:
octo_api.products.BaseProduct
Represents an Octopus Energy product.
- Parameters
available_from (
Union
[str
,datetime
,None
]) – The date from which the product is available.available_to (
Union
[str
,datetime
,None
]) – The date until which the product is available.brand (
str
) – The brand under which the product is sold.code (
str
) – The tariff code.description (
str
) – A description of the product.display_name (
str
) – The display name of the product.full_name (
str
) – The name of the product.is_business (
bool
) – Whether the product is for businesses.is_green (
bool
) – Whether the product is green.is_prepay (
bool
) – Whether the product is prepay.is_restricted (
bool
) – Whether the product is restricted.is_tracker (
bool
) – Whether the product tracks the wholesale electricity rate.is_variable (
bool
) – Whether the product has a variable tariff.links (
Iterable
[MutableMapping
[str
,Any
]]) – Links associated with this product.term (
Optional
[int
]) – The number of months that a product lasts for if it is fixed length.direction (
str
) – The direction of the product (supply to the customer or supply to the grid).
Attributes:
The direction of the product (supply to the customer or supply to the grid).
-
class
DetailedProduct
(available_from, available_to, brand, code, description, display_name, full_name, is_business, is_green, is_prepay, is_restricted, is_tracker, is_variable, links, term, tariffs_active_at, single_register_electricity_tariffs, dual_register_electricity_tariffs, single_register_gas_tariffs, sample_quotes, sample_consumption)[source] Bases:
octo_api.products.BaseProduct
Represents an Octopus Energy product, with detailed tariff information.
Each
*_tariffs
object will have up to 14 keys; one for each GSP. For each GSP the applicable tariffs are listed under their associated payment method, e.g. direct_debit_monthly.The
standard_unit_rate_*
values are listed in p/kWh (pence per kilowatt hour).The
standing_charge_*
values are listed in p/day (pence per day).The
annual_cost_*
values are listed in p (pence).
- Parameters
available_from (
Union
[str
,datetime
,None
]) – The date from which the product is available.available_to (
Union
[str
,datetime
,None
]) – The date until which the product is available.brand (
str
) – The brand under which the product is sold.code (
str
) – The tariff code.description (
str
) – A description of the product.display_name (
str
) – The display name of the product.full_name (
str
) – The name of the product.is_business (
bool
) – Whether the product is for businesses.is_green (
bool
) – Whether the product is green.is_prepay (
bool
) – Whether the product is prepay.is_restricted (
bool
) – Whether the product is restricted.is_tracker (
bool
) – Whether the product tracks the wholesale electricity rate.is_variable (
bool
) – Whether the product has a variable tariff.links (
Iterable
[MutableMapping
[str
,Any
]]) – Links associated with this product.term (
Optional
[int
]) – The number of months that a product lasts for if it is fixed length.single_register_electricity_tariffs (
Dict
[str
,Dict
[str
,Dict
[str
,Any
]]]) – Mapping of GSPs to applicable tariffs for each payment method, e.g. direct_debit_monthly.dual_register_electricity_tariffs (
Dict
[str
,Dict
[str
,Dict
[str
,Any
]]]) – Mapping of GSPs to applicable tariffs for each payment method, e.g. direct_debit_monthly.single_register_gas_tariffs (
Dict
[str
,Dict
[str
,Dict
[str
,Any
]]]) – Mapping of GSPs to applicable tariffs for each payment method, e.g. direct_debit_monthly.sample_consumption (
Dict
)
Attributes:
Mapping of GSPs to applicable tariffs for each payment method, e.g.
Mapping of GSPs to applicable tariffs for each payment method, e.g.
Mapping of GSPs to applicable tariffs for each payment method, e.g.
Methods:
from_dict
(d)Construct an instance of
DetailedProduct
from a dictionary.to_dict
([convert_values])Returns a dictionary containing the contents of the
DetailedProduct
object.-
dual_register_electricity_tariffs
Type:
Dict
Mapping of GSPs to applicable tariffs for each payment method, e.g. direct_debit_monthly.
-
classmethod
from_dict
(d) Construct an instance of
DetailedProduct
from a dictionary.
-
single_register_electricity_tariffs
Type:
Dict
Mapping of GSPs to applicable tariffs for each payment method, e.g. direct_debit_monthly.
-
single_register_gas_tariffs
Type:
Dict
Mapping of GSPs to applicable tariffs for each payment method, e.g. direct_debit_monthly.
-
to_dict
(convert_values=False) Returns a dictionary containing the contents of the
DetailedProduct
object.
-
class
RateInfo
(value_exc_vat, value_inc_vat, valid_from, valid_to)[source] Bases:
object
Represents the unit rate of a tariff at a particular period in time.
- Parameters
value_exc_vat (
float
) – In p/kWh (pence per kilowatt hour).value_inc_vat (
float
) – In p/kWh (pence per kilowatt hour).valid_from (
Union
[str
,datetime
,None
]) – The date and time from which this rate is in effect.valid_to (
Union
[str
,datetime
,None
]) – The date and time until which this rate is in effect, orNone
if this rate continues in perpetuity.
Methods:
from_dict
(d)Construct an instance of
RateInfo
from a dictionary.to_dict
([convert_values])Returns a dictionary containing the contents of the
RateInfo
object.Attributes:
The date and time from which this rate is in effect.
The date and time until which this rate is in effect, or
None
if this rate continues in perpetuity.In p/kWh (pence per kilowatt hour).
In p/kWh (pence per kilowatt hour).
-
to_dict
(convert_values=False) Returns a dictionary containing the contents of the
RateInfo
object.
-
class
Tariff
(code, standing_charge_exc_vat, standing_charge_inc_vat, online_discount_exc_vat, online_discount_inc_vat, dual_fuel_discount_exc_vat, dual_fuel_discount_inc_vat, exit_fees_exc_vat, exit_fees_inc_vat, links, standard_unit_rate_exc_vat=None, standard_unit_rate_inc_vat=None, day_unit_rate_exc_vat=None, day_unit_rate_inc_vat=None, night_unit_rate_exc_vat=None, night_unit_rate_inc_vat=None)[source] Bases:
object
Represents a tariff for a product.
- Parameters
code (
str
) – The tariff code.standing_charge_exc_vat (
float
) – In p/day (pence per day).standing_charge_inc_vat (
float
) – In p/day (pence per day).online_discount_exc_vat (
int
)online_discount_inc_vat (
int
)dual_fuel_discount_exc_vat (
int
)dual_fuel_discount_inc_vat (
int
)exit_fees_exc_vat (
int
)exit_fees_inc_vat (
int
)links (
List
[Dict
[str
,Any
]]) – Links associated with this product.standard_unit_rate_exc_vat (
Optional
[float
]) – In p/kWh (pence per kilowatt hour). DefaultNone
.standard_unit_rate_inc_vat (
Optional
[float
]) – In p/kWh (pence per kilowatt hour). DefaultNone
.day_unit_rate_exc_vat (
Optional
[float
]) – In p/kWh (pence per kilowatt hour). DefaultNone
.day_unit_rate_inc_vat (
Optional
[float
]) – In p/kWh (pence per kilowatt hour). DefaultNone
.night_unit_rate_exc_vat (
Optional
[float
]) – In p/kWh (pence per kilowatt hour). DefaultNone
.night_unit_rate_inc_vat (
Optional
[float
]) – In p/kWh (pence per kilowatt hour). DefaultNone
.
Methods:
from_dict
(d)Construct an instance of
Tariff
from a dictionary.to_dict
([convert_values])Returns a dictionary containing the contents of the
Tariff
object.
octo_api.utils
Utility functions.
Classes:
|
Information about a meter point. |
|
Enumeration of different rate types. |
|
Enumeration of different electricity supply regions. |
Functions:
|
Add a pretty-printed |
|
Constructs a |
-
namedtuple
MeterPointDetails
(mpan, gsp, profile_class)[source] Bases:
NamedTuple
Information about a meter point.
- Fields
Profile Class 1 – Domestic Unrestricted Customers
Profile Class 2 – Domestic Economy 7 Customers
Profile Class 3 – Non-Domestic Unrestricted Customers
Profile Class 4 – Non-Domestic Economy 7 Customers
Profile Class 5 – Non-Domestic Maximum Demand (MD) Customers with a Peak Load Factor (LF) of less than 20%
Profile Class 6 – Non-Domestic Maximum Demand Customers with a Peak Load Factor between 20% and 30%
Profile Class 7 – Non-Domestic Maximum Demand Customers with a Peak Load Factor between 30% and 40%
Profile Class 8 – Non-Domestic Maximum Demand Customers with a Peak Load Factor over 40%
Information from https://www.elexon.co.uk/knowledgebase/profile-classes/
See also
Load Profiles and their use in Electricity Settlement by Elexon
-
__repr__
() Return a string representation of the
MeterPointDetails
.- Return type
-
enum
RateType
(value)[source] Bases:
enum_tools.custom_enums.StrEnum
Enumeration of different rate types.
- Member Type
Valid values are as follows:
-
StandingCharge
= <RateType.StandingCharge: 'standing-charges'>
-
StandardUnitRate
= <RateType.StandardUnitRate: 'standard-unit-rates'>
-
DayUnitRate
= <RateType.DayUnitRate: 'day-unit-rates'>
-
NightUnitRate
= <RateType.NightUnitRate: 'night-unit-rates'>
-
enum
Region
(value)[source] Bases:
enum_tools.custom_enums.StrEnum
Enumeration of different electricity supply regions.
The different regions can be seen on the following map:
- Member Type
Valid values are as follows:
-
Eastern
= <Region.Eastern: '_A'>
-
EastMidlands
= <Region.EastMidlands: '_B'>
-
London
= <Region.London: '_C'>
-
Merseyside
= <Region.Merseyside: '_D'>
-
Midlands
= <Region.Midlands: '_E'>
-
NorthEastern
= <Region.NorthEastern: '_F'>
-
NorthWestern
= <Region.NorthWestern: '_G'>
-
Southern
= <Region.Southern: '_H'>
-
SouthEastern
= <Region.SouthEastern: '_J'>
-
SouthWales
= <Region.SouthWales: '_K'>
-
SouthWestern
= <Region.SouthWestern: '_L'>
-
Yorkshire
= <Region.Yorkshire: '_M'>
-
SouthScotland
= <Region.SouthScotland: '_N'>
-
NorthScotland
= <Region.NorthScotland: '_P'>
Overview
octo-api
uses tox to automate testing and packaging,
and pre-commit to maintain code quality.
Install pre-commit
with pip
and install the git hook:
python -m pip install pre-commit
pre-commit install
Coding style
formate is used for code formatting.
It can be run manually via pre-commit
:
pre-commit run formate -a
Or, to run the complete autoformatting suite:
pre-commit run -a
Automated tests
Tests are run with tox
and pytest
.
To run tests for a specific Python version, such as Python 3.6:
tox -e py36
To run tests for all Python versions, simply run:
tox
Build documentation locally
The documentation is powered by Sphinx. A local copy of the documentation can be built with tox
:
tox -e docs
License
octo-api
is licensed under the MIT License
A short and simple permissive license with conditions only requiring preservation of copyright and license notices. Licensed works, modifications, and larger works may be distributed under different terms and without source code.
Permissions | Conditions | Limitations |
---|---|---|
|
|
Copyright (c) 2020 Dominic Davis-Foster
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
Downloading source code
The octo-api
source code is available on GitHub,
and can be accessed from the following URL: https://github.com/domdfcoding/octo-api
If you have git
installed, you can clone the repository with the following command:
git clone https://github.com/domdfcoding/octo-api
Cloning into 'octo-api'...
remote: Enumerating objects: 47, done.
remote: Counting objects: 100% (47/47), done.
remote: Compressing objects: 100% (41/41), done.
remote: Total 173 (delta 16), reused 17 (delta 6), pack-reused 126
Receiving objects: 100% (173/173), 126.56 KiB | 678.00 KiB/s, done.
Resolving deltas: 100% (66/66), done.

Downloading a ‘zip’ file of the source code
Building from source
The recommended way to build octo-api
is to use tox:
tox -e build
The source and wheel distributions will be in the directory dist
.
If you wish, you may also use pep517.build or another PEP 517-compatible build tool.
View the Function Index or browse the Source Code.