uk_bin_collection 0.159.1__py3-none-any.whl → 0.159.3__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.
@@ -6,10 +6,16 @@ import json
6
6
  import os
7
7
 
8
8
  from bs4 import BeautifulSoup
9
- import easyocr
10
- import cv2
11
- import numpy as np
12
- from PIL import Image
9
+
10
+ # Optional OCR dependencies
11
+ try:
12
+ import easyocr
13
+ import cv2
14
+ import numpy as np
15
+ from PIL import Image
16
+ HAS_OCR = True
17
+ except ImportError:
18
+ HAS_OCR = False
13
19
  from selenium.webdriver.common.by import By
14
20
  from selenium.webdriver.support import expected_conditions as EC
15
21
  from selenium.webdriver.support.wait import WebDriverWait
@@ -917,6 +923,9 @@ class CouncilClass(AbstractGetBinDataClass):
917
923
 
918
924
  def initialize_ocr(self):
919
925
  """Initialize EasyOCR reader."""
926
+ if not HAS_OCR:
927
+ print("OCR dependencies not available. Install with: pip install uk_bin_collection[ocr]")
928
+ return None
920
929
  try:
921
930
  if not hasattr(self, 'ocr_reader'):
922
931
  print("Initializing OCR reader...")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: uk_bin_collection
3
- Version: 0.159.1
3
+ Version: 0.159.3
4
4
  Summary: Python Lib to collect UK Bin Data
5
5
  Author: Robert Bradley
6
6
  Author-email: robbrad182@gmail.com
@@ -8,13 +8,14 @@ Requires-Python: >=3.12,<3.14
8
8
  Classifier: Programming Language :: Python :: 3
9
9
  Classifier: Programming Language :: Python :: 3.12
10
10
  Classifier: Programming Language :: Python :: 3.13
11
+ Provides-Extra: ocr
11
12
  Requires-Dist: bs4
12
- Requires-Dist: easyocr (>=1.7.0,<2.0.0)
13
+ Requires-Dist: easyocr (>=1.7.0,<2.0.0) ; extra == "ocr"
13
14
  Requires-Dist: holidays
14
15
  Requires-Dist: icalevents (>=0.2.1,<0.3.0)
15
16
  Requires-Dist: lxml
16
17
  Requires-Dist: pandas
17
- Requires-Dist: pillow (>=10.0.0,<11.0.0)
18
+ Requires-Dist: pillow (>=10.0.0) ; extra == "ocr"
18
19
  Requires-Dist: python-dateutil
19
20
  Requires-Dist: requests
20
21
  Requires-Dist: selenium
@@ -268,7 +268,7 @@ uk_bin_collection/uk_bin_collection/councils/SouthDerbyshireDistrictCouncil.py,s
268
268
  uk_bin_collection/uk_bin_collection/councils/SouthGloucestershireCouncil.py,sha256=ZfEGycAT4A4KsEKGHlUBmMP3GRkodWOtRNiE1T_kfN4,2397
269
269
  uk_bin_collection/uk_bin_collection/councils/SouthHamsDistrictCouncil.py,sha256=DiijlLisR8qwPSo-4XSAiNk5G31-fYr7bDHKSFjDT7o,3180
270
270
  uk_bin_collection/uk_bin_collection/councils/SouthHollandDistrictCouncil.py,sha256=KU5-d6imNEV89O9WcAP-5WLcXUsouf9A-_mEZNxl-vo,5165
271
- uk_bin_collection/uk_bin_collection/councils/SouthKestevenDistrictCouncil.py,sha256=YLWnCglRBpvfuw_1cNBRPmGioF8_dd43kfkVk8aL6Gg,52574
271
+ uk_bin_collection/uk_bin_collection/councils/SouthKestevenDistrictCouncil.py,sha256=QcSHTjT3UwyQ_xzAz_R29_vNMstQt7YPvxg1mFsfogM,52833
272
272
  uk_bin_collection/uk_bin_collection/councils/SouthLanarkshireCouncil.py,sha256=fj-eZI0yrvQVCv8GvhcovZ3b9bV6Xv_ws3IunWjnv4U,3126
273
273
  uk_bin_collection/uk_bin_collection/councils/SouthNorfolkCouncil.py,sha256=C2qIZjjbl9JnuukX9OH2RbfP0hSdp3uX76APGY33qKs,4622
274
274
  uk_bin_collection/uk_bin_collection/councils/SouthOxfordshireCouncil.py,sha256=f9d2YDGv5hnN7Ul-u_I63h_BbpBU7CJFdgv-lOviRGc,4031
@@ -350,8 +350,8 @@ uk_bin_collection/uk_bin_collection/councils/tests/test_south_kesteven_district_
350
350
  uk_bin_collection/uk_bin_collection/councils/tests/test_south_kesteven_integration.py,sha256=ax_kevIIB1BpDTVjEnoiZnDk0srkc1Vw7B2i5XLLqiE,6647
351
351
  uk_bin_collection/uk_bin_collection/create_new_council.py,sha256=m-IhmWmeWQlFsTZC4OxuFvtw5ZtB8EAJHxJTH4O59lQ,1536
352
352
  uk_bin_collection/uk_bin_collection/get_bin_data.py,sha256=Qb76X46V0UMZJwO8zMNPvnVY7jNa-bmTlrirDi1tuJA,4553
353
- uk_bin_collection-0.159.1.dist-info/LICENSE,sha256=vABBUOzcrgfaTKpzeo-si9YVEun6juDkndqA8RKdKGs,1071
354
- uk_bin_collection-0.159.1.dist-info/METADATA,sha256=ea00NlOlSDzueVpUIYwsoIOyerpqMHlcr8fz2MQIvkw,26769
355
- uk_bin_collection-0.159.1.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
356
- uk_bin_collection-0.159.1.dist-info/entry_points.txt,sha256=36WCSGMWSc916S3Hi1ZkazzDKHaJ6CD-4fCEFm5MIao,90
357
- uk_bin_collection-0.159.1.dist-info/RECORD,,
353
+ uk_bin_collection-0.159.3.dist-info/LICENSE,sha256=vABBUOzcrgfaTKpzeo-si9YVEun6juDkndqA8RKdKGs,1071
354
+ uk_bin_collection-0.159.3.dist-info/METADATA,sha256=rpPRS0cSxYKCH_0ApiU5RhyR-sZS_XKeqimNW3FEEyM,26815
355
+ uk_bin_collection-0.159.3.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
356
+ uk_bin_collection-0.159.3.dist-info/entry_points.txt,sha256=36WCSGMWSc916S3Hi1ZkazzDKHaJ6CD-4fCEFm5MIao,90
357
+ uk_bin_collection-0.159.3.dist-info/RECORD,,