# 4.7.4.     패키지(Packages)

많은 모듈을 포함하는 매우 큰 응용 프로그램을 개발하려고 가정해 봅시다.&#x20;

모듈 수가 늘어나면 한 위치에 존재하는 모든 모듈을 추적하는 것이 어려워집니다. 이름이나 기능이 유사한 경우에는 각각을 파악하기가 더 어려워집니다. 그들을 그룹화하고 구성하는 방법이 필요합니다.&#x20;

패키지는 모듈과 하위 패키지들로 구성된 단일 Python 응용 프로그램 환경을 정의하는 계층적 파일 디렉토리 구조입니다. 패키지는 점으로 구분된 모듈 이름 표기를 사용하여 파이썬의 모듈의 네임스페이스를 구조화하는 방법입니다.&#x20;

모듈이 전역 변수 이름 간의 충돌을 피하는 방법이라면 패키지는 모듈 이름 간의 충돌을 방지합니다. 예를 들어, 모듈 이름 A.B는 A 라는 이름의 패키지에 있는 B 라는 이름의 서브 모듈을 가리키는 것입니다. 운영체제 고유의 계층적 파일 구조를 사용하기 때문에 패키지를 만드는 것이 매우 간단합니다.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdc-james.gitbook.io/onebook/3./3.7.-modules/3.7.4.-packages.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
