Skip to content

Namespaces

Sync and async namespace resources: create, list, update, and delete.

NamespacesResource

Bases: BaseResource

Synchronous access to the /namespaces endpoints.

All methods raise subclasses of :class:~ineepy.exceptions.IneepyError; authentication/permission failures raise :class:~ineepy.exceptions.UnauthorizedError / :class:~ineepy.exceptions.ForbiddenError.

create(namespace_id, *, title='', description=None, tags=None)

Create a new namespace.

Parameters:

Name Type Description Default
namespace_id str

Namespace identifier.

required
title str

Human-readable title.

''
description str | None

Optional description.

None
tags str | Iterable[str] | None

Tag name, or an iterable of tag names.

None

Returns:

Name Type Description
Created tuple[NamespaceResponse, str]

class:~ineepy.NamespaceResponse and its ETag.

Raises:

Type Description
ConflictError

Namespace already exists.

Example::

namespace, etag = client.namespaces.create(
    'raw', title='Raw data'
)

delete(namespace_id)

Delete an empty namespace.

Parameters:

Name Type Description Default
namespace_id str

Namespace identifier.

required

Raises:

Type Description
NotFoundError

No namespace with the given namespace_id.

ConflictError

Namespace still contains child namespaces or tables.

get_etag(namespace_id)

Return the current ETag for a namespace without fetching its body.

Parameters:

Name Type Description Default
namespace_id str

Namespace identifier.

required

Returns:

Type Description
str

ETag string for use in conditional requests.

Raises:

Type Description
NotFoundError

No namespace with the given namespace_id.

get_metadata(namespace_id)

Return a namespace's metadata and its current ETag.

Parameters:

Name Type Description Default
namespace_id str

Namespace identifier.

required

Returns:

Type Description
tuple[NamespaceResponse, str]

Tuple of :class:~ineepy.NamespaceResponse and ETag string.

Raises:

Type Description
NotFoundError

No namespace with the given namespace_id.

list(namespace_id=None, *, limit=None, offset=None, filters=None, order_by=None, prefer='model=namespace; format=minimal')

List namespaces.

When namespace_id is omitted, lists all root-level namespaces. When provided, lists child namespaces under that parent.

Parameters:

Name Type Description Default
namespace_id str | None

Parent namespace identifier (e.g. raw). Omit to list root-level namespaces.

None
limit int | None

Maximum number of items to return.

None
offset int | None

Number of items to skip.

None
filters str | Iterable[str] | None

Filter expressions in field:operator:value format (a single string or an iterable of strings).

None
order_by str | Iterable[str] | None

Sort expressions in field:direction format (a single string or an iterable of strings).

None
prefer str

Prefer header value controlling response verbosity: model=namespace; format=minimal|summary|full. Verified against the server: summary yields :class:~ineepy.NamespaceResponse items (id and metadata); minimal and full both currently yield :class:~ineepy.models.NamespaceResponseMinimal items (id only) — as of this server version, full on the list endpoint does not return more detail than minimal.

'model=namespace; format=minimal'

Returns:

Type Description
NamespacesListResponse

class:~ineepy.NamespacesListResponse containing metadata

NamespacesListResponse

and a list of items whose shape depends on prefer (see

NamespacesListResponse

above).

update(namespace_id, etag=None, *, title='', description=None, tags=None)

Replace a namespace's metadata.

This is a PUT: it replaces ALL metadata fields. Omitted fields are reset to their defaults (title='', description=None, tags=None) rather than left unchanged. Pass every field you want to keep.

Parameters:

Name Type Description Default
namespace_id str

Namespace identifier.

required
etag str | None

ETag for optimistic locking. When None, the current ETag is fetched automatically via :meth:get_etag.

None
title str

Human-readable title.

''
description str | None

Optional description.

None
tags str | Iterable[str] | None

Tag name, or an iterable of tag names.

None

Returns:

Name Type Description
Updated tuple[NamespaceResponse, str]

class:~ineepy.NamespaceResponse and new ETag.

Raises:

Type Description
NotFoundError

No namespace with the given namespace_id.

PreconditionFailedError

ETag mismatch.

AsyncNamespacesResource

Bases: AsyncBaseResource

Async access to the /namespaces endpoints.

All methods raise subclasses of :class:~ineepy.exceptions.IneepyError; authentication/permission failures raise :class:~ineepy.exceptions.UnauthorizedError / :class:~ineepy.exceptions.ForbiddenError.

create(namespace_id, *, title='', description=None, tags=None) async

Create a new namespace.

See :meth:NamespacesResource.create for full documentation.

delete(namespace_id) async

Delete an empty namespace.

See :meth:NamespacesResource.delete for full documentation.

get_etag(namespace_id) async

Return the current ETag for a namespace without fetching its body.

See :meth:NamespacesResource.get_etag for full documentation.

get_metadata(namespace_id) async

Return a namespace's metadata and its current ETag.

See :meth:NamespacesResource.get_metadata for full documentation.

list(namespace_id=None, *, limit=None, offset=None, filters=None, order_by=None, prefer='model=namespace; format=minimal') async

List namespaces.

See :meth:NamespacesResource.list for full documentation.

update(namespace_id, etag=None, *, title='', description=None, tags=None) async

Replace a namespace's metadata.

See :meth:NamespacesResource.update for full documentation.