Skip to content

Instantly share code, notes, and snippets.

version: '3.9'
networks:
backend:
services:
speedtest-exporter:
image: billimek/prometheus-speedtest-exporter:latest
container_name: prometheus-speedtest-exporter
ports:
{
"__inputs": [
{
"name": "DS_PROMETHEUS",
"label": "Prometheus",
"description": "",
"type": "datasource",
"pluginId": "prometheus",
"pluginName": "Prometheus"
}
Конкретно нужно чтобы были созданы 2 экземпляра класса в которых была бы общая переменная т.е. изменив значение атрибута в одном экземпляре в другом оно бы тоже поменялось...?
class Foo:
some = 0
@classmethod
def setSome(cls, val):
cls.some = val
@classmethod
def getSome(cls):