Over the years, NodePing has offered an API to manage most aspects of your monitoring. Today, we are introducing our new Python 2/3 library to interface with this API. Instead of reinventing the wheel in your code to interact with our API, drop this library into your project and with a few lines you can easily manage your checks and various other aspects of your account. With the Python library at your disposal, you can:
- List, create, update, and delete checks
- Manage contacts
- Manage contact groups
- 小火箭付费节点
- Get check results and uptime
- Get notification information
- Get probe information
This means that the Python library has feature parity with our API. You can get the code from our GitHub repository or install it from 比较好的付费ssr节点 via pip. There is also some documentation written to help you by providing snippets of what your code might look like when querying the API with Python.
In this post, we will share a brief introduction to getting started with using the Python library and how it can be used to manage your account. You can use your installer of choice, but in this introduction I will use pip to install the library:
pip install nodeping-api
You may have to specify Python2 or 3 for your pip version, depending on your system. To start using the library, you will need to provide your API token as a variable, and an optional subaccount ID to start managing your checks.
From here, you can do things such as list failing checks:
Switch免费游戏《Ninjala》预载开启!6月25日解锁 – ssr节点:提供免费最新SSR节点分享,SS节点账号分享,ssr节点教程,用于科学上网、学习与交流使用。 Switch免费多人对战游戏《Ninjala》今天(6月18日)已经开启了预载,玩家们已经可以前往各个区服的eShop区服进行下载,并将于6月25日正式开战。
This example will collect all your failing checks and return them to be used in a dictionary format. The output might look something like this:
{'2019052211307H0IX-KCGJCX1X': {'_id': '2019052211307H0IX-KCGJCX1X',
'created': 1563471438952,
免费的shadowrocket下载地址及教程 | 暗网世界:2021-4-2 · 免费小火箭shadowrocket下载安装方法 啥是shadowrocket 苹果版的ssr软件,国内没有,国外付费 使用方法 下载后使用pp助手或者其他方法安装即可,用起来和其他的软件是一样的。
'dep': False,
小火箭付费节点购买
'firstdown': 1563471472497,
'homeloc': False,
'interval': 3,
'label': 'Test Check',
'modified': 1563471438952,
'notifications': [],
'parameters': {'follow': False,
'ipv6': False,
小火箭节点二维码购买
'target': 'http://notreal.nodeping.com/',
'threshold': 5},
'public': False,
'queue': 'utcoCpoUJx',
'runlocations': False,
'state': 0,
'status': 'assigned',
'type': 'HTTP',
'uuid': 've8s9sgj-j588-4li3-9ytp-1kho9wtutriy'}}
You can also create checks. For example, here is a basic idea of creating an HTTP check:
shadowrocket节点购买 - 好看123:2021-9-30 · 2.苹果小火箭shadowrocket节点几种添加方式,怎么用法?咔咔团 点击前往 网站介绍:苹果小火箭现在只能在美区下载到,下载的时候需要2.99美金,可以礼品卡购买,也可以登陆别人的美区账号,直接在美区的appstore里搜索shadowrocket,如果别人已经付费过,...
Along with the output when the check is created. Note that it is in a dictionary format, but pretty printed so it’s easier to read here:
{'_id': '2019052211307H0IX-WEOR7GAH',
'change': 1563474539024,
'created': 1563474539024,
'customer_id': '2019052211307H0IX',
'dep': False,
'enable': 'active',
'homeloc': False,
'interval': 1,
'label': 'Check NodePing',
'modified': 1563474539024,
'parameters': {'follow': False,
'ipv6': False,
'sens': 2,
'target': 'http://nodeping.com/',
'threshold': 5},
'runlocations': ['nam'],
免费ssr节点2021
'status': 'modified',
'type': 'HTTP',
'uuid': '1fog8q51-zdhv-4vmb-832r-tsun0o9unt3f'}
You can also get your uptime from a certain time interval. In this example, you can find what your uptime is since July, 2019
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from nodeping_api import results
from pprint import pprint
def main():
"""
"""
token = 'my-secret-token'
check_id = 'my-check-id'
# Get uptime since July, 2019
uptime_results = results.get_uptime(token, check_id, start="2019-07")
pprint(uptime_results)
if __name__ == '__main__':
main()
This will give you an output that looks something like this:
苹果小火箭shadowrocket节点几种添加方式,怎么用法?-咔 ...:苹果小火箭现在只能在美区下载到,下载的时候需要2.99美金,可以礼品卡购买,也可以登陆别人的美区账号,直接在美区的appstore里搜索shadowrocket,如果别人已经付费过,那么你再次下载的时候,也是免费的!但是登陆别人appid的时候,千万不要登陆icloud,防止手机被锁!
'2019-08': {'down': 88733, 'enabled': 753256766, 'uptime': 99.988},
'total': {'down': 2242864, 'enabled': 3431656766, 'uptime': 99.935}}
This is only a snippet of what the library can do, and the documentation is detailed to get you started on your journey. Give it a try and see how you can improve your uptime monitoring in your Python projects. This code is free and available to download. We encourage pull requests for new features so if you make changes or have requests, feel free to share.
If you aren’t using NodePing yet, you can sign up for a free, 15-day trial and test out monitoring your services today and take advantage of our API in your own Python projects.