pygazpar 1.3.0b4__tar.gz → 1.3.0b5__tar.gz

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: pygazpar
3
- Version: 1.3.0b4
3
+ Version: 1.3.0b5
4
4
  Summary: Python library to download gas consumption from a GrDF (French Gas Company) account
5
5
  License: MIT License
6
6
 
@@ -7,6 +7,8 @@ import traceback
7
7
 
8
8
  import pygazpar
9
9
 
10
+ Logger = logging.getLogger(__name__)
11
+
10
12
 
11
13
  def main():
12
14
  """Main function"""
@@ -37,6 +39,9 @@ def main():
37
39
 
38
40
  args = parser.parse_args()
39
41
 
42
+ print(f"PyGazpar version: {pygazpar.__version__}")
43
+ print(f"Running on Python version: {sys.version}")
44
+
40
45
  # We create the tmp directory if not already exists.
41
46
  if not os.path.exists(args.tmpdir):
42
47
  os.mkdir(args.tmpdir)
@@ -51,11 +56,12 @@ def main():
51
56
  filename=f"{pygazparLogFile}", level=logging.DEBUG, format="%(asctime)s %(levelname)s [%(name)s] %(message)s"
52
57
  )
53
58
 
54
- logging.info(f"PyGazpar {pygazpar.__version__}")
55
- logging.info(f"--tmpdir {args.tmpdir}")
56
- logging.info(f"--frequency {args.frequency}")
57
- logging.info(f"--lastNDays {args.lastNDays}")
58
- logging.info(f"--datasource {bool(args.datasource)}")
59
+ Logger.info(f"PyGazpar version: {pygazpar.__version__}")
60
+ Logger.info(f"Running on Python version: {sys.version}")
61
+ Logger.info(f"--tmpdir {args.tmpdir}")
62
+ Logger.info(f"--frequency {args.frequency}")
63
+ Logger.info(f"--lastNDays {args.lastNDays}")
64
+ Logger.info(f"--datasource {bool(args.datasource)}")
59
65
 
60
66
  if args.datasource == "json":
61
67
  client = pygazpar.Client(pygazpar.JsonWebDataSource(args.username, args.password))
@@ -72,6 +78,8 @@ def main():
72
78
  print("An error occured while querying PyGazpar library : %s", traceback.format_exc())
73
79
  return 1
74
80
 
81
+ Logger.info(f"Data loaded: {len(data)} records")
82
+ Logger.debug(f"Data: {data}")
75
83
  print(json.dumps(data, indent=2))
76
84
 
77
85
  return 0
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "pygazpar"
3
- version = "1.3.0b4"
3
+ version = "1.3.0b5"
4
4
  description = "Python library to download gas consumption from a GrDF (French Gas Company) account"
5
5
  license = { file = "LICENSE" }
6
6
  readme = "README.md"
File without changes
File without changes
File without changes
File without changes