{"id":24003541,"url":"https://github.com/moosetraveller/aputil","last_synced_at":"2026-02-27T10:33:22.278Z","repository":{"id":65461394,"uuid":"421864466","full_name":"moosetraveller/aputil","owner":"moosetraveller","description":"Utility classes and functions for arcpy","archived":false,"fork":false,"pushed_at":"2025-04-15T12:44:47.000Z","size":84,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-14T01:13:08.610Z","etag":null,"topics":["arcgis","arcgis-pro","arcgis-python","arcpy","arcpy-util","arcpy-utilities","esri","gis","python","python-3","python-library","python-script","python3","util","utility-library"],"latest_commit_sha":null,"homepage":"","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/moosetraveller.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2021-10-27T15:04:28.000Z","updated_at":"2024-06-20T21:26:02.000Z","dependencies_parsed_at":"2025-05-27T21:05:19.427Z","dependency_job_id":"a524cca7-cb50-4f0d-b4d5-1296a29a7316","html_url":"https://github.com/moosetraveller/aputil","commit_stats":null,"previous_names":["moosetraveller/aputil","moosetraveller/arcpy-util"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/moosetraveller/aputil","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetraveller%2Faputil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetraveller%2Faputil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetraveller%2Faputil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetraveller%2Faputil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moosetraveller","download_url":"https://codeload.github.com/moosetraveller/aputil/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moosetraveller%2Faputil/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29891514,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-27T09:48:51.284Z","status":"ssl_error","status_checked_at":"2026-02-27T09:48:43.992Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["arcgis","arcgis-pro","arcgis-python","arcpy","arcpy-util","arcpy-utilities","esri","gis","python","python-3","python-library","python-script","python3","util","utility-library"],"created_at":"2025-01-08T01:39:45.331Z","updated_at":"2026-02-27T10:33:22.260Z","avatar_url":"https://github.com/moosetraveller.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# APUtil\n\nUtility classes and functions for arcpy. APUtil stands for **A**rc**P**y and **UTIL**ity.\n\n## Install \n\n```shell\npython -m pip install aputil\n```\n\nNote: Future releases are published on PyPi.\n\n## Example\n\n### `aputil.xcursor`\n\n### Using `xcursor(cursor)`\n\n```python\nimport arcpy, arcpy.da\n\nfrom aputil import xcursor\n\nfeature_class = \"points.shp\"\n\nwith arcpy.da.SearchCursor(feature_class, [\"FieldName\"]) as cursor:\n\n    for row in xcursor(cursor):\n        \n        print(row[\"FieldName\"])  # instead of row[0]\n\n        # other examples\n        print(row.get(\"FieldName\", \"Default Value\"))\n        print(row.get_by_index(0, \"Default Value\"))\n```\n\n#### Using `to_row()`\n\nSee `test/xcursor_test.py` (test `test_to_row`) for an example.\n\n### `aputil.tcursor`\n\n### Using `tcursor(cursor)`\n\n```python\nimport arcpy, arcpy.da\n\nfrom aputil import tcursor\n\nfeature_class = \"points.shp\"\n\nwith arcpy.da.SearchCursor(feature_class, [\"FieldName\"]) as cursor:\n\n    for row in tcursor(cursor):\n\n        print(row.FieldName)  # instead of row[0]\n```\n\n### `aputil.fc`\n\n#### Using `use_memory()`\n\n```python\nimport arcpy, arcpy.management\n\nfrom aputil import fc\n\narcpy.env.workspace = r\"c:\\data\"\n\nwith fc.use_memory() as copied:\n\n    print(arcpy.Exists(copied))  # false (not yet)\n    arcpy.management.CopyFeatures(\"buildings.shp\", copied)\n    print(arcpy.Exists(copied))  # true\n\nprint(arcpy.Exists(copied))  # false\n```\n\n#### Using `count(fc)`\n\n```python\nimport arcpy\n\nfrom aputil import fc\n\nrecord_count = fc.count(r\"c:\\data\\buildings.shp\")\n\nprint(record_count)\n```\n\n### `aputil.typings`\n\n```python\nimport arcpy, arcpy.management\n\nfrom aputil.typings import FeatureClassType\n\ndef create_feature_class() -\u003e FeatureClassType:\n    return arcpy.management.CreateFeatureclass(r\"c:\\temp\", \"test.shp\")\n\nprint(create_feature_class())\n```\n\n## Run Unit Tests\n\n```shell\ncd c:\\projects\\aputil\n[conda activate arcgispro-py3]\npython test.py\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoosetraveller%2Faputil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmoosetraveller%2Faputil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmoosetraveller%2Faputil/lists"}