# `GSLayer.attributes`

*Instance Property*

Values that configure layer behavior and special layer formats.

## Declaration

```swift
var attributes: [GSLayerAttribute : Any]? { get set }
```

```objc
@property (nonatomic, strong) NSDictionary<NSString *,id> * attributes;
```

[See also `attributes` in the Python API](https://docu.glyphsapp.com/#GSLayer.attributes)

```python
pyobjc_instanceMethods.attributes() -> dict[str, object]
pyobjc_instanceMethods.setAttributes_(attributes: dict[str, object])
```

## Discussion

Attribute values must support property-list encoding.

## See Also

### Attributes

- [`GSLayer countOfAttributes`](/Core/GlyphsCore/GSLayer/countOfAttributes) — The number of attributes.
- [`GSLayer attributeForKey:`](/Core/GlyphsCore/GSLayer/attributeForKey:) — The value for an attribute key, or `nil` if no value is set.
- [`GSLayer setAttributesFast:`](/Core/GlyphsCore/GSLayer/setAttributesFast:) — Replaces all attributes without registering undo or notifying the glyph.
- [`GSLayer setAttribute:forKey:`](/Core/GlyphsCore/GSLayer/setAttribute:forKey:) — Sets or removes an attribute.
- [`GSLayer setAttributeFast:forKey:`](/Core/GlyphsCore/GSLayer/setAttributeFast:forKey:) — Sets an attribute without registering undo or notifying the glyph.
- [`GSLayer removeAttributeForKey:`](/Core/GlyphsCore/GSLayer/removeAttributeForKey:) — Removes an attribute.

