read ()) for file in load_files ( "markets/*.json" ): for market in file : pass Benchmarks glob ( paths, recursive = True ): with open ( path, "rb" ) as file : yield bfd. # generator to read in files def load_files ( paths : str ): for path in glob. You can also load the file through any other means and pass the raw bytes and name into the File object constructor. glob ( "data/self_recorded/*.gz" ) files = bfd. glob ( "data/betfair_official/*.tar" ) + glob. Or you can use the glob library to find and select all the paths automatically. It supports reading in bz2, gzip or uncompressed (.json) stream files or. You can read in files quickly in a worker thread using the provided Files utility. Files ( paths ): market_count += 1 for market in file : update_count += 1 print ( f "Markets " ) Loading Files Example import betfair_data as bfd paths = market_count = 0 update_count = 0 for file in bfd. It supports both the official Betfair's historic data and self recorded stream files. Betfair Data is a very fast, Rust based, Betfair historical data parsing library for python.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |