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
valueappears inlst
📄 Project structure
ft_package/
__init__.py
count_in_list.py
pyproject.toml
README.md
LICENSE
👤 Author
-
Name: jamrabhi
-
Email: jamrabhi@student.42.fr
-
GitHub: https://github.com/jamrabhi/
📜 License
This project is licensed under the MIT License.
See the LICENSE file for more details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e6b615c3a191013017158327a6a94e598ab249e4b378497eccb20044ffd9298
|
|
| MD5 |
b5292567c82e2c4fccf22459261eb65e
|
|
| BLAKE2b-256 |
c93b48a22407d5f5f6a78a52539e16b2987cc7546290f168a5c7e49ba6be1a48
|
File details
Details for the file ft_package_jamrabhi-0.0.1-py3-none-any.whl.
File metadata
- Download URL: ft_package_jamrabhi-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c1b314ec393afc113941a66340aeed1f0c9e7eebf3e46f3f3f318545adb1f60
|
|
| MD5 |
2eab221082835e7bf55fa453ceb0cd29
|
|
| BLAKE2b-256 |
2800aa9c9e920a5f9fb336fab3191ae0e41c930f651bdb60ed23c939b76d8d06
|