{"id":30041559,"url":"https://github.com/syrte/fortio","last_synced_at":"2025-08-07T02:49:56.439Z","repository":{"id":25626911,"uuid":"29062180","full_name":"syrte/fortio","owner":"syrte","description":"A Python IO for Fortran Unformatted Binary File with Variable-Length Records.","archived":false,"fork":false,"pushed_at":"2021-02-12T15:31:15.000Z","size":29,"stargazers_count":7,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-29T09:06:33.481Z","etag":null,"topics":["binary-data","fortran","io","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/syrte.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-10T15:58:40.000Z","updated_at":"2024-10-31T07:50:42.000Z","dependencies_parsed_at":"2022-09-09T20:02:11.094Z","dependency_job_id":null,"html_url":"https://github.com/syrte/fortio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/syrte/fortio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Ffortio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Ffortio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Ffortio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Ffortio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/syrte","download_url":"https://codeload.github.com/syrte/fortio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/syrte%2Ffortio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269189906,"owners_count":24375571,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-07T02:00:09.698Z","response_time":73,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-data","fortran","io","python"],"created_at":"2025-08-07T02:49:52.093Z","updated_at":"2025-08-07T02:49:56.430Z","avatar_url":"https://github.com/syrte.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fortio\nA Python IO for Fortran Unformatted Binary Files with Variable-Length Records.\n\n## Features\n- read and write Fortran unformatted file\n- auto-detect endianness(byteorder)\n- allow reading data into pre-allocated buffers\n- allow skipping over records or jumping to wanted record directly without reading data\n- support subrecords (which is necessary for long record whose size larger than\n  4GB with signed 4 bytes integer header)\n- support numpy.memmap array for fast loading\n\n## Installation\n\n```bash\npip install fortio\n```\n\n## Usage\n```\nfrom fortio import FortranFile\nwith FortranFile(filename) as f:\n    a = f.read_record('i4')\n    f.skip_record()\n    b = f.read_record('f8')\n```\n\nRead file that contains subrecords (e.g., records greater than 4GB) by setting signed header,\n```\nwith FortranFile(filename, header_dtype='int32') as f:\n    ...\n```\n\nPlease read the docstring of `FortranFile` for detailed documentation.\n\n\n## Functions\n- FortranFile(filename, mode='r', header_dtype='uint32',\n              auto_endian=True, check_file=True)\n\n- methods\n    * write_record(data)\n    * read_record(dtype='byte', shape=None, rec=None, memmap=False)\n    * mmap_record(dtype='byte', shape=None, rec=None)\n    * read_record_into(into, offset=None, rec=None)\n    * get_record_size(rec=None)\n    * skip_record(nrec=1)\n    * goto_record(rec=None)\n    * close()\n    * flush()\n\n- properties\n    * file\n    * filesize\n    * mode\n    * header_dtype\n    * long_records\n    * closed\n    * byteorder\n\n- internal properties and methods\n    * _fp\n    * _offsets\n    * _lengths\n    * _read_header()\n    * _check_byteorder()\n    * _check_file()\n    * _read_record_data(data)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrte%2Ffortio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsyrte%2Ffortio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsyrte%2Ffortio/lists"}