---
title: "package(path:)"
framework: swift-package-manager
role: symbol
role_heading: Type Method
path: "swift-package-manager/documentation/packagedescription/package/dependency/package(path:)"
---

# package(path:)

Adds a local dependency to a package located at the path you provide.

## Declaration

```swift
static func package(path: String) -> Package.Dependency
```

## Parameters

- `path`: The file system path to the package.

## Return Value

Return Value A package dependency.

## Discussion

Discussion If the package you depend on defines traits, the package manager uses the dependency with its default set of traits. The Swift Package Manager uses the package dependency as-is and does not perform any source control access. Local package dependencies are especially useful during development of a new package or when working on multiple tightly coupled packages.

## See Also

### Creating a local dependency

- [package(name:path:)](swift-package-manager/documentation/packagedescription/package/dependency/package(name:path:).md)
- [package(name:path:traits:)](swift-package-manager/documentation/packagedescription/package/dependency/package(name:path:traits:).md)
- [package(path:traits:)](swift-package-manager/documentation/packagedescription/package/dependency/package(path:traits:).md)
