{"id":19378158,"url":"https://github.com/almarklein/fastuaparser","last_synced_at":"2025-04-23T19:31:45.068Z","repository":{"id":45246529,"uuid":"257597447","full_name":"almarklein/fastuaparser","owner":"almarklein","description":"A super-fast user agent string parser","archived":false,"fork":false,"pushed_at":"2020-04-21T14:10:30.000Z","size":10,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-01T11:47:12.877Z","etag":null,"topics":["python","user-agent","web-analytics","web-server"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/almarklein.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":"2020-04-21T13:03:27.000Z","updated_at":"2022-08-03T15:12:12.000Z","dependencies_parsed_at":"2022-07-15T17:47:30.421Z","dependency_job_id":null,"html_url":"https://github.com/almarklein/fastuaparser","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Ffastuaparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Ffastuaparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Ffastuaparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/almarklein%2Ffastuaparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/almarklein","download_url":"https://codeload.github.com/almarklein/fastuaparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223932161,"owners_count":17227277,"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","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":["python","user-agent","web-analytics","web-server"],"created_at":"2024-11-10T09:05:01.992Z","updated_at":"2024-11-10T09:05:02.644Z","avatar_url":"https://github.com/almarklein.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fastuaparser\nA super-fast user agent string parser\n\n\n## Usage\n\n```py\nfrom fastuaparser import parse_ua\n\n# Parse the user agent header to get a descriptive string.\n# (This never raises an exception).\nclient_os = parse_ua(headers.get(\"user-agent\", \"\"))\n\n# Want to process browser-type and OS seperately?\nclient, os = client_os.partition(' - ')\n```\n\n\n## A bit less precise, a whole lot faster\n\nThis code is less precise than https://github.com/ua-parser/uap-python,\nin that it marks rare browsers as either \"Browser\" or as the browser\nthat it's based upon (e.g. IceWeasel becomes Firefox). It also marks\nall bots as simply \"Bot\" and does not care about TV's that have a\nbrowser. Other than that, this function is quite accurate and passes\nua-parser's test suite.\n\nIf you can live with the above restrictions (you probably can if\nyou're using this to e.g. monitor your website's traffic) then use\nthis function: it's over 100 times faster that ua_parser!\n\nEfficiency matters. It means you can do analytics on your web server\nwithout adding significant overhead. These little savings of CPU add\nup, and can help reduce the carbon footprint of your web server.\n\n\n## Origins\n\nThis code used to be part of [my time tracking app](https://timeturtle.app),\nbut now I'm moving things around, and turning it into a open source\npackage is just easier.\n\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmarklein%2Ffastuaparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falmarklein%2Ffastuaparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falmarklein%2Ffastuaparser/lists"}