AtomicOs

Client

Apr 18th, 2021 (edited)
397
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Intro
  2.  
  3. This wrapper has both asynchronous & synchronous support, this intro will cover the basic of both. Lucily for you the API for asynchronous (awaiting) & synchronous (blocking) is identical.
  4.  
  5. Getting started
  6.  
  7. Awaiting
  8.  
  9. import proxycheck
  10.  
  11. client = proxycheck.Awaiting(
  12.     key=""
  13. )
  14.  
  15. ip = client.ip("51.68.191.78")
  16.  
  17. if await ip.proxy():
  18.     print("Is proxy")
  19.  
  20. risk_score = await ip.risk()
  21. latitude, longitude = await ip.geological()
  22.  
  23. data = await ip.get()
  24.  
  25. # A client should always be closed after being used!
  26. await client.close()
  27. Blocking
  28.  
  29. import proxycheck
  30.  
  31. client = proxycheck.Blocking(
  32.     key=""
  33. )
  34.  
  35. ip = client.ip("51.68.191.78")
  36.  
  37. if ip.proxy():
  38.     print("Is proxy")
  39.  
  40. risk_score = ip.risk()
  41. latitude, longitude = ip.geological()
  42.  
  43. data = ip.get()
  44.  
Add Comment
Please, Sign In to add comment