# Koleksiyonları yönetme

Hub'daki Space'inizi yönetmek için kullanılan yöntemlerin referansı için [HfApi](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi) dokümantasyon sayfasına göz atın.

- Koleksiyon içeriğini alın: [get_collection()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.get_collection)
- Yeni koleksiyon oluştur: [create_collection()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.create_collection)
- Koleksiyon güncelle: [update_collection_metadata()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.update_collection_metadata)
- Bir koleksiyonun kaynak grubunu güncelle: [update_collection_resource_group()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.update_collection_resource_group)
- Koleksiyon silme: [delete_collection()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.delete_collection)
- Bir koleksiyona öğe ekleyin: [add_collection_item()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.add_collection_item)
- Bir koleksiyondaki öğeyi güncelle: [update_collection_item()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.update_collection_item)
- Bir koleksiyondan bir öğe kaldırın: [delete_collection_item()](/docs/huggingface_hub/v2.4.0/tr/package_reference/hf_api#huggingface_hub.HfApi.delete_collection_item)

### Koleksiyon[[huggingface_hub.Collection]]

#### huggingface_hub.Collection[[huggingface_hub.Collection]]

```python
huggingface_hub.Collection(**kwargs)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/hf_api.py#L1381)

**Parametreler:**

slug (`str`) : Koleksiyonun slug'ı. Örn. `"TheBloke/recent-models-64f9a55bb3115b4f513ec026"`.

title (`str`) : Koleksiyonun başlığı. Örn. `"Recent models"`.

owner (`str`) : Koleksiyonun sahibi. Örn. `"TheBloke"`.

items (`list[CollectionItem]`) : Koleksiyondaki öğelerin listesi.

last_updated (`datetime`) : Koleksiyonun son güncellenme tarihi.

position (`int`) : Koleksiyonun, sahibin koleksiyonları listesindeki konumu.

private (`bool`) : Koleksiyonun özel olup olmadığı.

theme (`str`) : Koleksiyonun teması. Örn. `"green"`.

upvotes (`int`) : Koleksiyonun olumlu oy sayısı.

description (`str`, *isteğe bağlı*) : Koleksiyonun düz metin olarak açıklaması.

url (`str`) : (property) Hub'daki koleksiyonun URL'si.

Hub'daki bir Koleksiyon hakkında bilgi içerir.

### CollectionItem[[huggingface_hub.CollectionItem]]

#### huggingface_hub.CollectionItem[[huggingface_hub.CollectionItem]]

```python
huggingface_hub.CollectionItem(_id: str, id: str, type: CollectionItemType_T, position: int, note: dict | None = None, **kwargs)
```

[Kaynak](https://github.com/huggingface/huggingface_hub/blob/v2.4.0/src/huggingface_hub/hf_api.py#L1333)

**Parametreler:**

item_object_id (`str`) : Koleksiyondaki öğenin benzersiz kimliği.

item_id (`str`) : Hub'daki altta yatan nesnenin kimliği. repo_id, bir makale kimliği, bir koleksiyon slug'u veya bir bucket kimliği olabilir. Örn. `"jbilcke-hf/ai-comic-factory"`, `"2307.09288"`, `"celinah/cerebras-function-calling-682607169c35fbfa98b30b9a"`.

item_type (`str`) : Altta yatan nesnenin türü. `"model"`, `"dataset"`, `"space"`, `"paper"`, `"collection"` veya `"bucket"` değerlerinden biri olabilir.

position (`int`) : Koleksiyondaki öğenin konumu.

note (`str`, *isteğe bağlı*) : Öğeyle ilişkili not, düz metin olarak.

Bir Koleksiyon öğesi (model, veri seti, Space, makale, koleksiyon veya bucket) hakkında bilgi içerir.

