endpoints.attachments   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A Attachments.create() 0 7 1
1
from .base import Resource
2
3
4
# =======================================================
5
# Attachments
6
# =======================================================
7
class Attachments(Resource):
8
    def create(self,
9
               filename: str,
10
               file: bytes):
11
        files = {
12
            "files[]": (filename, file, "multipart/form-data")
13
        }
14
        return self._post("/attachments", files=files)
15