Project#

class pyinaturalist.models.Project(id=None, uuid=None, banner_color=None, created_at=_Nothing.NOTHING, description=None, header_image_url=None, hide_title=None, icon=None, is_umbrella=None, last_post_at=None, location=None, observation_requirements_updated_at=None, place_id=None, prefers_user_trust=None, project_observation_rules=_Nothing.NOTHING, project_type=None, rule_preferences=_Nothing.NOTHING, search_parameters=_Nothing.NOTHING, site_features=_Nothing.NOTHING, slug=None, terms=None, title=None, updated_at=None, user_ids=_Nothing.NOTHING, admins=_Nothing.NOTHING, project_observation_fields=_Nothing.NOTHING, user=None)#

Bases: BaseModel

An iNaturalist project, based on the schema of GET /projects.

Attributes

Name

Type

Description

id

int

Unique record ID

uuid

str

Unversally unique record ID

banner_color

str

created_at

datetime

Date and time the project was created

description

str

Project description

header_image_url

str

hide_title

bool

icon

str

URL for project icon

is_umbrella

bool

Indicates if this is an umbrella project (containing observations from other projects)

last_post_at

Optional[datetime]

Date and time of the last project journal post

location

Tuple[float, float]

Location in (latitude, longitude) decimal degrees

observation_requirements_updated_at

Optional[datetime]

Date and time of last update for observation requirements

place_id

int

Project place ID

prefers_user_trust

bool

Indicates if the project wants users to share hidden coordinates with the project admins

project_observation_rules

List[Dict]

Project observation rules

project_type

str

Project type

Options: assessment, bioblitz, collection, umbrella

rule_preferences

List[Dict]

search_parameters

List[Dict]

Filters for observations to include

site_features

List[Dict]

Details about if/when the project was featured on inaturalist.org

slug

str

URL slug

terms

str

Project terms

title

str

Project title

updated_at

datetime

Date and time the project was last updated

user_ids

List[int]

obs_fields (property)

Any

obs_rules (property)

Any

url (property)

str

Info URL on iNaturalist.org

admins (LazyProperty)

List[User]

Project admin users

project_observation_fields (LazyProperty)

List[ProjectObservationField]

Observation fields used by the project

user (LazyProperty)

User

User that created the project

Methods

__init__(id=None, uuid=None, banner_color=None, created_at=_Nothing.NOTHING, description=None, header_image_url=None, hide_title=None, icon=None, is_umbrella=None, last_post_at=None, location=None, observation_requirements_updated_at=None, place_id=None, prefers_user_trust=None, project_observation_rules=_Nothing.NOTHING, project_type=None, rule_preferences=_Nothing.NOTHING, search_parameters=_Nothing.NOTHING, site_features=_Nothing.NOTHING, slug=None, terms=None, title=None, updated_at=None, user_ids=_Nothing.NOTHING, admins=_Nothing.NOTHING, project_observation_fields=_Nothing.NOTHING, user=None)#

Method generated by attrs for class Project.

classmethod copy(obj)#

Copy a model object. This is defined as a classmethod to easily initialize a subclass from a parent class instance. For copying an instance to the same type, copy.deepcopy() can be used.

Return type:

BaseModel

classmethod from_json(value, **kwargs)#

Initialize a single model object from an API response or response result.

Omits any invalid fields and None values, so default factories are used instead (e.g. for empty dicts and lists).

Return type:

TypeVar(T, bound= BaseModel)

classmethod from_json_file(value)#

Initialize a collection of model objects from a JSON string, file path, or file-like object

Return type:

List[TypeVar(T, bound= BaseModel)]

classmethod from_json_list(value, **kwargs)#

Initialize a collection of model objects from an API response or response results

Return type:

List[TypeVar(T, bound= BaseModel)]

to_dict(keys=None, recurse=True)#

Convert this object back to dict format

Parameters:
  • keys (Optional[List[str]]) – Only keep the specified keys (attribute names)

  • recurse (bool) – Recurse into nested model objects

Return type:

Dict[str, Any]