ct 0.10.8.117__py3-none-any.whl → 0.10.8.118__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
cantools/__init__.py CHANGED
@@ -1,4 +1,4 @@
1
- __version__ = "0.10.8.117"
1
+ __version__ = "0.10.8.118"
2
2
 
3
3
  from . import util, hooks
4
4
  from . import config as cfgmod
cantools/config.py CHANGED
@@ -95,6 +95,16 @@ for key, val in items:
95
95
  c.update(target, val)
96
96
 
97
97
  config.update("cache", pc)
98
+ if config.dotenv:
99
+ from dotenv import find_dotenv, load_dotenv, dotenv_values
100
+ denvpath = find_dotenv(usecwd=True)
101
+ print("dotenv:", denvpath)
102
+ load_dotenv(denvpath, verbose=True, override=True)
103
+ if os.path.exists(config.dotenv):
104
+ print("loading env from", config.dotenv)
105
+ denv = read(config.dotenv, isjson=True)
106
+ config.cache.withdot(denv, dotenv_values())
107
+
98
108
  if not config.db.main:
99
109
  config.db.update("main", config.db[config.web.server])
100
110
  if "ENV" in config.db.main:
@@ -103,6 +113,11 @@ if "ENV" in config.db.main:
103
113
  ["DB_USERNAME", "DB_PASSWORD", "DB_HOST", "DB_DATABASE"]))))
104
114
  if "DBPW" in config.db.main:
105
115
  config.db.update("main", config.db.main.replace("DBPW", config.cache("database password? ")))
116
+
117
+ if len(config.db.main.split("@")) > 2:
118
+ p1, p2 = config.db.main.rsplit("@", 1)
119
+ config.db.update("main", "%s@%s"%(p1.replace("@", "%40"), p2))
120
+
106
121
  for prop in ["deep", "flush", "timestamp", "allow"]:
107
122
  confyg.log.update(prop, config.log[prop])
108
123
  for prop in ["cache", "refcount", "main", "test", "blob", "alter", "echo", "jsontext", "arraytext", "stringsize", "flatkeysize"]:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: ct
3
- Version: 0.10.8.117
3
+ Version: 0.10.8.118
4
4
  Summary: Modern minimal web framework
5
5
  Author: Mario Balibrera
6
6
  Author-email: mario.balibrera@gmail.com
@@ -13,7 +13,7 @@ Classifier: Operating System :: OS Independent
13
13
  Classifier: Programming Language :: Python
14
14
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
15
15
  License-File: LICENSE
16
- Requires-Dist: babyweb >=0.1.2
16
+ Requires-Dist: babyweb >=0.1.3
17
17
  Requires-Dist: catmail >=0.1.9.1
18
18
  Requires-Dist: databae >=0.1.5.3
19
19
  Requires-Dist: dez >=0.10.10.45
@@ -1,10 +1,10 @@
1
- cantools/__init__.py,sha256=6IP7Z8uNdWuFguHwvIpYl4vytFFwC3JOhUxUEa6RvMg,824
1
+ cantools/__init__.py,sha256=8Em0DwOWMbQe2ZNigZHTrjArBi7LufQlRY7Yy94EaXQ,824
2
2
  cantools/_db.py,sha256=g-kXshJpjfLiYPg8GtTrae1bD0uZ8eWbYi8ORKaXGNs,5075
3
3
  cantools/_memcache.py,sha256=xv_rumi1mrr6Br4ofZXTA6deNOEyZg6nwFW6QEcUVZ4,2154
4
4
  cantools/_pay.py,sha256=hvu8SiFVUySVIu5W1SZuD_6DHaUWnmy0XOITPlt1C3M,1292
5
5
  cantools/admin.py,sha256=MuRKvFQ_LhGqRro6cY6e6PGOBjLXGwKKcTJ1GuAa3K0,1182
6
6
  cantools/cfg.py,sha256=N1hBT_MwuHIYAtZ0vczjnE9B_cvwq_IcgTWRvoBUGZI,8920
7
- cantools/config.py,sha256=qppVBsnh8StiJtWUz_BGdTB3GCHPf-6ehmRYo0IR7N0,5381
7
+ cantools/config.py,sha256=Z1T8ud6o4hnr0pXRhp4vOXK6kVt8x6TgqI0huWX0mSg,5888
8
8
  cantools/geo.py,sha256=WQMWp142niNzRf4WXRurzGPiFaZ3orbDpBwQC2gZXn0,5422
9
9
  cantools/hooks.py,sha256=kEnYBt8Fl6EFJz_u-jPQjGQTXa9TxACZxPMbgUW3cHc,219
10
10
  cantools/db/__init__.py,sha256=slJyO03jrCTEqDWzXUkrsmolGoJTO42FPJSLCE87RSM,614
@@ -48,9 +48,9 @@ cantools/web/__init__.py,sha256=nJOA_sNuT31LgFauWGUjznjhWoubjb1JqGVg2XWXjhM,407
48
48
  cantools/web/bw.py,sha256=N-cimUHYyDuHv8v2Ut0twsi8yBDMb3alw1m9EpCYDEs,2704
49
49
  cantools/web/gae_server.py,sha256=dPLkEsvzOb-wEFCSMleCvIElNnJoLRMdAGw5DYytwGU,2007
50
50
  cantools/web/util.py,sha256=ovacYpR6VtJVw9MvL9jJuXdkMKKv8A5GxjWE-KlYe70,4367
51
- ct-0.10.8.117.dist-info/LICENSE,sha256=lUkxqJkYxLYhvL52PQdG8L3aqmG241XXmThs30isJTU,1078
52
- ct-0.10.8.117.dist-info/METADATA,sha256=WhURxOwaPYGD4Udx_-kfRGgLX2AP8wbSX9lLoytiYdc,1175
53
- ct-0.10.8.117.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
54
- ct-0.10.8.117.dist-info/entry_points.txt,sha256=Gd3wUZp5AMeazvq2oIOh4qn57T2joZ8NeHenLhXG4Hw,261
55
- ct-0.10.8.117.dist-info/top_level.txt,sha256=Tl_rJpBXgVrhgmBrKozbrcQrKnOIX89JqFF7aF_4EbA,9
56
- ct-0.10.8.117.dist-info/RECORD,,
51
+ ct-0.10.8.118.dist-info/LICENSE,sha256=lUkxqJkYxLYhvL52PQdG8L3aqmG241XXmThs30isJTU,1078
52
+ ct-0.10.8.118.dist-info/METADATA,sha256=QV4VIHDZ7BZZhcorW4OmdydoYc0xyZuOyVbgI_3nMzE,1175
53
+ ct-0.10.8.118.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
54
+ ct-0.10.8.118.dist-info/entry_points.txt,sha256=Gd3wUZp5AMeazvq2oIOh4qn57T2joZ8NeHenLhXG4Hw,261
55
+ ct-0.10.8.118.dist-info/top_level.txt,sha256=Tl_rJpBXgVrhgmBrKozbrcQrKnOIX89JqFF7aF_4EbA,9
56
+ ct-0.10.8.118.dist-info/RECORD,,