Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

swapper

This tool will

  1. Take a sgid-internal feature class name (ie SGID.OWNER.FeatureClass) as input.
  2. Parse the name to get the corresponding connection files in L:\sgid_to_agol\ConnectionFilesSGID
  3. Check if the input sgid-internal connection file exists
  4. Check if the output sgid10 connection file exists
  5. Check if the sgid-internal input feature class exists
  6. Copy the feature class to sgid10 named fc_temp
  7. Run a function to delete the table locks on the old sgid10 feature class that's being replaced
  8. Delete the sgid10 feature class that's being replaced
  9. Rename the new copied feature class from fc_temp to fc
  10. Update the privileges for the agrc and SearchAPI users

Setup

Production

  1. git clone https://github.com/agrc/swapper
  2. cd swapper
  3. From within a virtual environment that has python 3.6+ and arcpy: pip install .\ -U
  4. Set SWAPPER_* environment variables as outlined in [.env.sample].

Development

  1. Clone project.
  2. Update .env file to be the correct path to the share folder.
  3. From within a virtual environment that has python 3.6+ and arcpy: pip install -e .[tests]
  4. swapper ...
  5. pytest

Usage

CLI

Run swapper for usage information.

From within other python code

from swapper import swapper

swapper.copy_and_replace('sgid.boundaries.counties')

Metadata

Release files for ugrc-swapper 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ugrc-swapper 1.2.4
File Size Uploaded Provenance Actions
ugrc_swapper-1.2.4.tar.gz 8.2 kB With provenance Details for ugrc_swapper-1.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ugrc-swapper 1.2.4
File Interpreter ABI Platform Actions
ugrc_swapper-1.2.4-py3-none-any.whl Python 3 none any Details for ugrc_swapper-1.2.4-py3-none-any.whl

Total release size: 15.5 kB

Release files / ugrc_swapper-1.2.4.tar.gz

Download URL ugrc_swapper-1.2.4.tar.gz
Size 8.2 kB
Tags Source
SHA-256 checksum
How to use checksums
fbb5077210630e6babdf98669c7d13538e2f472660f1486f34f501f1e4f5d72c
BLAKE2b-256 checksum
How to use checksums
b58c311daa1794ad0d33d4589e637e89699ba0a3457a0b116a1022c01fdae443
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2025.

Transparency log

Release files / ugrc_swapper-1.2.4-py3-none-any.whl

Download URL ugrc_swapper-1.2.4-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
099a4807ddcfa777cd0cc71276daf5ae384e9a014027003f10eebbb8c115de42
BLAKE2b-256 checksum
How to use checksums
e1dcd7555d080e73f0104191ff84a041cf4b9e12c635b9a8a1c2ecf4ba5c1478
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2025.

Transparency log

Security for ugrc-swapper 1.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ugrc_swapper-1.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2025.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page