🔐 Sid Gifari File Manager Pro
v8.0.5 | 2026-08-08 17:12:14 | PHP 8.2.32
📂
/ (Root)
/
opt
/
alt
/
python38
/
lib
/
python3.8
/
site-packages
/
influxdb_client
/
client
/
__pycache__
📍 /opt/alt/python38/lib/python3.8/site-packages/influxdb_client/client/__pycache__
🔄 Refresh
✏️
Editing: bucket_api.cpython-38.pyc
Read Only
U v�i� � @ sP d Z ddlZddlmZmZmZmZ ddlmZ ddl m Z G dd� de�ZdS )z� A bucket is a named location where time series data is stored. All buckets have a retention policy, a duration of time that each data point persists. A bucket belongs to an organization. � N)�BucketsService�Bucket�PostBucketRequest�PatchBucketRequest)�get_org_query_param)� _Paginatedc @ s` e Zd ZdZdd� Zded�dd�Zeed�d d �Zdd� Zd d� Z dd� Z dd� Zdd� ZdS )� BucketsApiz.Implementation for '/api/v2/buckets' endpoint.c C s || _ t|j�| _dS )zInitialize defaults.N)�_influxdb_clientr Z api_client�_buckets_service)�self�influxdb_client� r �R/opt/alt/python38/lib/python3.8/site-packages/influxdb_client/client/bucket_api.py�__init__ s zBucketsApi.__init__N)�returnc C s� |dkrg }g }t |t�r&|�|� n |�|� |dk rDt�dt� |dkrtt|||t|dkrb|n|| j dd�d�}| j j|d�S )a� Create a bucket. :param Bucket|PostBucketRequest bucket: bucket to create :param bucket_name: bucket name :param description: bucket description :param org_id: org_id :param bucket_name: bucket name :param retention_rules: retention rules array or single BucketRetentionRules :param str, Organization org: specifies the organization for create the bucket; Take the ``ID``, ``Name`` or ``Organization``. If not specified the default value from ``InfluxDBClient.org`` is used. :return: Bucket If the method is called asynchronously, returns the request thread. Nzorg_id is deprecated; use orgT)�org�clientZrequired_id)�name�retention_rules�description�org_id)Zpost_bucket_request)� isinstance�list�extend�append�warnings�warn�DeprecationWarningr r r r Zpost_buckets)r �bucket�bucket_namer r r r �rulesr r r � create_bucket s$ ��zBucketsApi.create_bucket)r r c C s&