{"id":13502313,"url":"https://github.com/mitsuhiko/python-unio","last_synced_at":"2025-08-11T22:36:00.043Z","repository":{"id":16454620,"uuid":"19206529","full_name":"mitsuhiko/python-unio","owner":"mitsuhiko","description":"Unbreaks Unicode on Python","archived":false,"fork":false,"pushed_at":"2021-07-23T08:33:03.000Z","size":118,"stargazers_count":164,"open_issues_count":2,"forks_count":3,"subscribers_count":11,"default_branch":"master","last_synced_at":"2025-04-02T01:12:12.148Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mitsuhiko.png","metadata":{"files":{"readme":"README","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":"2014-04-27T14:31:21.000Z","updated_at":"2025-03-04T10:57:00.000Z","dependencies_parsed_at":"2022-09-19T07:00:16.883Z","dependency_job_id":null,"html_url":"https://github.com/mitsuhiko/python-unio","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mitsuhiko/python-unio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuhiko%2Fpython-unio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuhiko%2Fpython-unio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuhiko%2Fpython-unio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuhiko%2Fpython-unio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mitsuhiko","download_url":"https://codeload.github.com/mitsuhiko/python-unio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mitsuhiko%2Fpython-unio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269969282,"owners_count":24505427,"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-11T02:00:10.019Z","response_time":75,"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":[],"created_at":"2024-07-31T22:02:09.606Z","updated_at":"2025-08-11T22:36:00.020Z","avatar_url":"https://github.com/mitsuhiko.png","language":"Python","readme":"unIO!\n\n  unio is a Python module that tries to set an end to all unicode\n  problems.  What it does is providing explicit access to binary and unicode\n  data for both Python 2 and 3 that work exactly the same on both systems and\n  considerably better than the builtin defaults.\n\nWhat it gives you:\n\n  * explicit access to stdin/stdout/stderr in both binary and text mode\n  * improved file open functions that work the same on 2.x and 3.x that\n    handle all encodings for you and come with sensible defaults\n  * helper functions to deal with all of the crazy Python 3 unicode\n    encoding edge cases\n\nBasic API:\n\nunio.TextIO:\n  gives the most appropriate in-memory text io (accepts only unicode)\nunio.BytesIO:\n  gives the most appropriate in-memory bytes io (accepts only bytes)\nunio.NativeIO:\n  gives the most appropriate in-memory IO for the system.  That's bytes\n  only on Python 3 and bytes + unicode within reason on Python 2.\n\nunio.get_binary_stdin()\nunio.get_binary_stdout()\nunio.get_binary_stderr()\n  Does what the name says, on all platforms.\n\nunio.get_text_stdin()\nunio.get_text_stdout()\nunio.get_text_stderr()\n  Returns a standard stream wrapped in a way that it yields unicode data.\n  It will do that in the most appropriate encoding and intelligently fix\n  some broken environments to utf-8.  You can also force the encoding to\n  be something of your choice this way.\n\nunio.capture_stdout()\n  Captures stdout (and optionally stderr) in a bytes io and provides some\n  fixes for Python 3 limitations on flushing.\n\nunio.get_binary_argv()\n  Returns a copy of sys.argv fixed up to bytes on all versions of Python.\n\nunio.binary_env\n  A byte version of os.environ on all python envs.\n\nunio.open()\n  Intelligently opens a file in binary or text mode, by following sane\n  default encodings and the same behavior on 2.x and 3.x.  The default\n  encoding for text files is utf-8 or utf-8-sig based on the mode.  No\n  magic environment defaults.\n\nunio.is_ascii_encoding()\n  Checks if a given encoding is ascii or not.\n\nunio.get_filesystem_encoding()\n  Like sys.getdefaultencoding() but will intelligently assume utf-8 in\n  situations where it assumes a broken environment.\n","funding_links":[],"categories":["Python"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitsuhiko%2Fpython-unio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmitsuhiko%2Fpython-unio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmitsuhiko%2Fpython-unio/lists"}