Entry point of the API
From the temporary database
Get a single rank.
Parameters: |
|
---|---|
Return type: | List Note Format of the list [asn, date, source, rank]
|
From the temporary database
Get worse ASNs.
Parameters: |
|
---|---|
Return type: | Dictionary Note Format of the Dictionary {
'source': source,
'date': date,
'top_list':
[
((asn, rank), set([source1, source2, ...])),
...
]
}
The set of sources is only presetn if with_sources is True |
Get all ranks for all the ASNs on a timeframe.
Parameters: |
|
---|---|
Rype : | Dictionary Note Format of the dictionary: {
YYYY-MM-DD:
{
asn1 :
{
'details':
[
(source1, rank),
(source2, rank),
...
],
'total': sum_of_ranks
}
...
}
...
}
The details key is only present if with_details_sources is True. |
Get all the ranks on a timeframe for a single ASN.
Parameters: |
|
---|---|
Rype : | Dictionary Note Format of the output: {
date1:
{
'details':
[
(source1, rank),
(source2, rank),
...
],
'total': sum_of_ranks
}
...
}
The details key is only present if with_details_sources is True. |
Get all what is available in the database about an ASN for one day
Parameters: |
|
---|---|
Return type: | Dictionary Note Format of the dictionary: {
'date': date,
'sources': [source1, source2, ...],
'asn': asn,
asn:
{
'clean_blocks':
[
(timestamp, block, descr),
...
],
'old_blocks':
[
(timestamp, block, descr),
...
],
asn_timestamp:
{
'owner': owner_description,
'ip_block': block,
'nb_of_ips': nb,
'sources': [source1, source2, ...]
'rank': subnet_rank
},
...
}
}
|
Get the ranks of a list of ASNs for one day and one source.
Parameters: |
|
---|---|
Return type: | list of rank by ASN Note Format of the output: [
(asn1, rank),
(asn2, rank),
...
]
|
Get all what is available in the database about an subnet for one day
Parameters: |
|
---|---|
Return type: | Dictionary Note Format of the dictionary: {
'date': date,
'sources': [source1, source2, ...],
'asn': asn,
'timestamp': asn_timestamp
asn_timestamp:
{
ip: [source1, source2, ...],
...
}
}
|
Get the description of the ASN (usually the owner name).
Parameters: |
|
---|---|
Return type: | List Note Format of the list: [asn, block, owner]
|
Return amount of asn and subnets found by source, for all the cached days.
Return type: | Dictionary Note Format of the Dictionary {
date:
{
'sources':
{
source : [nb_asns, nb_subnets],
...
},
'total_asn': total_asn
'total_subnets': total_subnets
}
...
}
|
---|
Get the sources parsed during a list of dates
Parameters: | dates – List of dates |
---|---|
Return type: | Set of sources for each date |
Get the weights for all the sources.
Parameters: | date – Date of the information (default: last ranked day) |
---|---|
Return type: | Dictionary Note Format of the dictionary: {
source: date,
...
}
|
Get a dictionary of sources by dates. Only with the sources passed in parameter IF they exist for the day. :param sources: List of sources :param last_day: Last day of the interval :param timeframe: size of the interval
Return type: | Dictionary Note Format of the dictionary: {
date: [source1, source2, ...],
...
}
|
---|
Get the last time a source has been seen. :param dates_sources: Dictionaries of the dates and sources
Note
Format of the dictionary:
{ YYYY-MM-DD: [source1, source2, ...], YYYY-MM-DD: [source1, source2, ...], ... }
Rype : | Dictionary Note Format of the dictionary: {
source: date,
...
}
|
---|
Get a dictionary of sources by dates.
Parameters: |
|
---|---|
Return type: | Dictionary Note Format of the dictionary: {
date: [source1, source2, ...],
...
}
|