scaleway_core.bridge package
Submodules
scaleway_core.bridge.decimal module
- scaleway_core.bridge.decimal.marshal_Decimal(data: Decimal) Dict[str, Any]
Marshal an instance of Decimal into google.protobuf.Decimal JSON representation.
- scaleway_core.bridge.decimal.unmarshal_Decimal(data: Any) Decimal
Unmarshal an instance of Decimal from the given data.
scaleway_core.bridge.money module
- class scaleway_core.bridge.money.Money(currency_code: str, units: float, nanos: int)
Bases:
object
Represents an amount of money with its currency type.
- currency_code: str
3-letter currency code defined in ISO 4217.
- nanos: int
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
- units: float
Whole units of the amount.
For example if currency_code is “USD”, then 1 unit is one US dollar.
scaleway_core.bridge.region module
scaleway_core.bridge.scwfile module
- class scaleway_core.bridge.scwfile.ScwFile(name: str, content_type: str, content: str)
Bases:
object
Represents a Scaleway file.
- content: str
Content of the file in base64.
- content_type: str
Content-type of the file.
- name: str
Name of the file.
scaleway_core.bridge.serviceinfo module
- class scaleway_core.bridge.serviceinfo.ServiceInfo(name: str, description: str, version: str, documentation_url: Optional[str] = None)
Bases:
object
Represents API metadata.
These metadata are only here for debugging. Do not rely on these values.
- description: str
Human readable description for the API.
- documentation_url: Optional[str] = None
Web url where the documentation of the API can be found.
- name: str
Name of the API
- version: str
Version of the API.
- scaleway_core.bridge.serviceinfo.marshal_ServiceInfo(obj: ServiceInfo) Dict[str, Any]
Marshals a ServiceInfo object into a dict.
- scaleway_core.bridge.serviceinfo.unmarshal_ServiceInfo(data: Any) ServiceInfo
Unmarshals a ServiceInfo object from a dict.
scaleway_core.bridge.timeseries module
- class scaleway_core.bridge.timeseries.TimeSeries(name: str, points: List[TimeSeriesPoint], metadata: Dict[str, str])
Bases:
object
Represents a time series that could be used for graph purposes.
- metadata: Dict[str, str]
Metadata contains some string metadata related to a metric.
- name: str
Name of the metric.
- points: List[TimeSeriesPoint]
Points contains all the points that composed the series.
- class scaleway_core.bridge.timeseries.TimeSeriesPoint(timestamp: datetime, value: float)
Bases:
object
Represents a point in a TimeSeries.
- timestamp: datetime
Date of the point.
- value: float
Value of the point.
- scaleway_core.bridge.timeseries.marshal_TimeSeries(data: TimeSeries) Dict[str, Any]
Marshal an instance of TimeSeries into a JSON compatible data structure.
- scaleway_core.bridge.timeseries.marshal_TimeSeriesPoint(data: TimeSeriesPoint) Dict[str, Any]
Marshal an instance of TimeSeriesPoint into a JSON compatible data structure.
- scaleway_core.bridge.timeseries.unmarshal_TimeSeries(data: Any) TimeSeries
Unmarshal an instance of TimeSeries from the given data.
- scaleway_core.bridge.timeseries.unmarshal_TimeSeriesPoint(data: Any) TimeSeriesPoint
Unmarshal an instance of TimeSeriesPoint from the given data.
scaleway_core.bridge.zone module
Module contents
- class scaleway_core.bridge.Money(currency_code: str, units: float, nanos: int)
Bases:
object
Represents an amount of money with its currency type.
- currency_code: str
3-letter currency code defined in ISO 4217.
- nanos: int
Number of nano (10^-9) units of the amount.
The value must be between -999,999,999 and +999,999,999 inclusive. If units is positive, nanos must be positive or zero. If units is zero, nanos can be positive, zero, or negative. If units is negative, nanos must be negative or zero. For example $-1.75 is represented as `units`=-1 and `nanos`=-750,000,000.
- units: float
Whole units of the amount.
For example if currency_code is “USD”, then 1 unit is one US dollar.
- scaleway_core.bridge.Region
alias of
str
- class scaleway_core.bridge.ScwFile(name: str, content_type: str, content: str)
Bases:
object
Represents a Scaleway file.
- content: str
Content of the file in base64.
- content_type: str
Content-type of the file.
- name: str
Name of the file.
- class scaleway_core.bridge.ServiceInfo(name: str, description: str, version: str, documentation_url: Optional[str] = None)
Bases:
object
Represents API metadata.
These metadata are only here for debugging. Do not rely on these values.
- description: str
Human readable description for the API.
- documentation_url: Optional[str] = None
Web url where the documentation of the API can be found.
- name: str
Name of the API
- version: str
Version of the API.
- class scaleway_core.bridge.TimeSeries(name: str, points: List[TimeSeriesPoint], metadata: Dict[str, str])
Bases:
object
Represents a time series that could be used for graph purposes.
- metadata: Dict[str, str]
Metadata contains some string metadata related to a metric.
- name: str
Name of the metric.
- points: List[TimeSeriesPoint]
Points contains all the points that composed the series.
- class scaleway_core.bridge.TimeSeriesPoint(timestamp: datetime, value: float)
Bases:
object
Represents a point in a TimeSeries.
- timestamp: datetime
Date of the point.
- value: float
Value of the point.
- scaleway_core.bridge.Zone
alias of
str
- scaleway_core.bridge.marshal_Decimal(data: Decimal) Dict[str, Any]
Marshal an instance of Decimal into google.protobuf.Decimal JSON representation.
- scaleway_core.bridge.marshal_Money(data: Money) Dict[str, Any]
Marshal an instance of Money into a JSON compatible data structure.
- scaleway_core.bridge.marshal_ScwFile(obj: ScwFile) Dict[str, Any]
Marshals a ScwFile object into a dict.
- scaleway_core.bridge.marshal_ServiceInfo(obj: ServiceInfo) Dict[str, Any]
Marshals a ServiceInfo object into a dict.
- scaleway_core.bridge.marshal_TimeSeries(data: TimeSeries) Dict[str, Any]
Marshal an instance of TimeSeries into a JSON compatible data structure.
- scaleway_core.bridge.marshal_TimeSeriesPoint(data: TimeSeriesPoint) Dict[str, Any]
Marshal an instance of TimeSeriesPoint into a JSON compatible data structure.
- scaleway_core.bridge.unmarshal_Decimal(data: Any) Decimal
Unmarshal an instance of Decimal from the given data.
- scaleway_core.bridge.unmarshal_Money(data: Any) Money
Unmarshal an instance of Money from the given data.
- scaleway_core.bridge.unmarshal_ScwFile(data: Any) ScwFile
Unmarshals a ScwFile object from a dict.
- scaleway_core.bridge.unmarshal_ServiceInfo(data: Any) ServiceInfo
Unmarshals a ServiceInfo object from a dict.
- scaleway_core.bridge.unmarshal_TimeSeries(data: Any) TimeSeries
Unmarshal an instance of TimeSeries from the given data.
- scaleway_core.bridge.unmarshal_TimeSeriesPoint(data: Any) TimeSeriesPoint
Unmarshal an instance of TimeSeriesPoint from the given data.