Coverage for /var/srv/projects/api.amasfac.comuna18.com/tmp/venv/lib/python3.9/site-packages/stripe/__init__.py: 95%

21 statements  

« prev     ^ index     » next       coverage.py v6.4.4, created at 2023-07-17 14:22 -0600

1from __future__ import absolute_import, division, print_function 

2 

3import os 

4 

5# Stripe Python bindings 

6# API docs at http://stripe.com/docs/api 

7# Authors: 

8# Patrick Collison <patrick@stripe.com> 

9# Greg Brockman <gdb@stripe.com> 

10# Andrew Metcalf <andrew@stripe.com> 

11 

12# Configuration variables 

13 

14api_key = None 

15client_id = None 

16api_base = "https://api.stripe.com" 

17connect_api_base = "https://connect.stripe.com" 

18upload_api_base = "https://files.stripe.com" 

19api_version = None 

20verify_ssl_certs = True 

21proxy = None 

22default_http_client = None 

23app_info = None 

24enable_telemetry = True 

25max_network_retries = 0 

26ca_bundle_path = os.path.join( 

27 os.path.dirname(__file__), "data", "ca-certificates.crt" 

28) 

29 

30# Set to either 'debug' or 'info', controls console logging 

31log = None 

32 

33# API resources 

34from stripe.api_resources import * # noqa 

35 

36# OAuth 

37from stripe.oauth import OAuth # noqa 

38 

39# Webhooks 

40from stripe.webhook import Webhook, WebhookSignature # noqa 

41 

42 

43# Sets some basic information about the running application that's sent along 

44# with API requests. Useful for plugin authors to identify their plugin when 

45# communicating with Stripe. 

46# 

47# Takes a name and optional version and plugin URL. 

48def set_app_info(name, partner_id=None, url=None, version=None): 

49 global app_info 

50 app_info = { 

51 "name": name, 

52 "partner_id": partner_id, 

53 "url": url, 

54 "version": version, 

55 }