Skip to main content

A sample test package

Project description

ft_package

A small demonstration package created as part of the 42 Python module.
It provides a simple utility function: count_in_list, which counts how many times a given value appears in a list.


📦 Installation

After building your package, you can install it using:

pip install ./dist/ft_package-0.0.1.tar.gz

or

pip install ./dist/ft_package-0.0.1-py3-none-any.whl

Once installed, it will appear in:

pip list pip show -v ft_package


🧰 Usage

Example script using the package:

from ft_package import count_in_list
print(count_in_list(["toto", "tata", "toto"], "toto")) # output: 2
print(count_in_list(["toto", "tata", "toto"], "tutu")) # output: 0

📝 Functions

count_in_list(lst: list, value) -> int

Counts the number of occurrences of value inside the list lst.

Parameters

  • lst — a list of elements

  • value — the element to count

Returns

  • An integer representing how many times value appears in lst

📄 Project structure

ft_package/
	__init__.py
	count_in_list.py

pyproject.toml
README.md
LICENSE

👤 Author


📜 License

This project is licensed under the MIT License.
See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ft_package_jamrabhi-0.0.1.tar.gz (2.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ft_package_jamrabhi-0.0.1-py3-none-any.whl (3.3 kB view details)

Uploaded Python 3

File details

Details for the file ft_package_jamrabhi-0.0.1.tar.gz.

File metadata

  • Download URL: ft_package_jamrabhi-0.0.1.tar.gz
  • Upload date:
  • Size: 2.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for ft_package_jamrabhi-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1e6b615c3a191013017158327a6a94e598ab249e4b378497eccb20044ffd9298
MD5 b5292567c82e2c4fccf22459261eb65e
BLAKE2b-256 c93b48a22407d5f5f6a78a52539e16b2987cc7546290f168a5c7e49ba6be1a48

See more details on using hashes here.

File details

Details for the file ft_package_jamrabhi-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for ft_package_jamrabhi-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c1b314ec393afc113941a66340aeed1f0c9e7eebf3e46f3f3f318545adb1f60
MD5 2eab221082835e7bf55fa453ceb0cd29
BLAKE2b-256 2800aa9c9e920a5f9fb336fab3191ae0e41c930f651bdb60ed23c939b76d8d06

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page