You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 9, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Feb 9, 2026. It is now read-only.
methods to create and parse standard resource prefixes with repo_name, directory_path as parameters #10
It'd be good to have some utilities for constructing prefixes for resources based on the repo name and directory name, relative to repo root. This would include a timestamp (so that resources without a created time property could be aged) as well as a random identifier.
Likewise, we could have helpers to parse resource identifiers and determine (1) they match the repo name and directory name and (2) they are older than some time-to-live (24 hours seems a good default)
changed the title [-]method to create standard resource prefixes with `repo_name`, `directory_path` as parameters[/-][+]methods to create and parse standard resource prefixes with `repo_name`, `directory_path` as parameters[/+]on Apr 6, 2021
Turns out that DatasetListItem objects don't actually have a created property (even though Dataset does), so it is more efficient to parse the date from the resource name.
On second glance at this, I'd probably remove the _ from the date format`.
I don't think we'll want a whole bunch of extra arguments to resource_prefix() and the other functions. I think we'll want some kind of config. Maybe it's actually part of a class? That might actually be an appropriate use for one (holding the RESOURCE_PREFIX constant)
Activity
[-]method to create standard resource prefixes with `repo_name`, `directory_path` as parameters[/-][+]methods to create and parse standard resource prefixes with `repo_name`, `directory_path` as parameters[/+]tswast commentedon Apr 27, 2021
I actually realized my first implementation has a problem, which I believe I've fixed in googleapis/python-bigquery#627
Turns out that
DatasetListItemobjects don't actually have acreatedproperty (even though Dataset does), so it is more efficient to parse the date from the resource name.On second glance at this, I'd probably remove the
_from the date format`.tswast commentedon Jul 1, 2021
Started prototyping here: https://github.com/googleapis/python-test-utils/tree/issue10-resource-prefixes
I don't think we'll want a whole bunch of extra arguments to
resource_prefix()and the other functions. I think we'll want some kind of config. Maybe it's actually part of a class? That might actually be an appropriate use for one (holding the RESOURCE_PREFIX constant)