alphavantage.web   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 Function

Rating   Name   Duplication   Size   Complexity  
A get() 0 7 1
1
from datetime import datetime
0 ignored issues
show
Coding Style introduced by
This module should have a docstring.

The coding style of this project requires that you add a docstring to this code element. Below, you find an example for methods:

class SomeClass:
    def some_method(self):
        """Do x and return foo."""

If you would like to know more about docstrings, we recommend to read PEP-257: Docstring Conventions.

Loading history...
2
3
import requests
4
5
from alphavantage.reference import BASE_URL
6
7
8
def get(session: requests.Session, parameters=None, url=BASE_URL):
9
    """Request data as JSON."""
10
11
    response = session.get(url, params=parameters)
12
    retrieved_at = datetime.utcnow()
13
14
    return response.json(), retrieved_at
15