Skip to content

Commit ffdcf38

Browse files
committed
Initial commit: INPI API Client v2.0.0
0 parents  commit ffdcf38

26 files changed

+5680
-0
lines changed

.env.EXAMPLE

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# French Companies API Client - Environment Variables Configuration
2+
# Copy this file to .env and fill in your actual credentials
3+
4+
# =============================================================================
5+
# INPI API Credentials
6+
# =============================================================================
7+
# Your INPI account credentials (email and password)
8+
# Register at: https://data.inpi.fr/register
9+
10+
INPI_PASSWORD=your_password_here
11+
12+
# =============================================================================
13+
# IMPORTANT NOTES
14+
# =============================================================================
15+
# 1. Never commit the .env file to version control!
16+
# 2. Add .env to your .gitignore file
17+
# 3. Keep your credentials secure
18+
# 4. Rotate credentials periodically
19+
20+
# =============================================================================
21+
# How to use:
22+
# =============================================================================
23+
# 1. Copy this file: cp .env.example .env
24+
# 2. Edit .env with your actual credentials
25+
# 3. Install python-dotenv: pip install python-dotenv
26+
# 4. Load in your code:
27+
# from dotenv import load_dotenv
28+
# load_dotenv()

.github/workflows/ci-pipeline.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI Pipeline
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
env:
10+
PYTHON_VERSION: "3.11"
11+
12+
jobs:
13+
lint:
14+
name: Lint & Code Quality
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- name: Set up Python
21+
uses: actions/setup-python@v5
22+
with:
23+
python-version: ${{ env.PYTHON_VERSION }}
24+
cache: "pip"
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r requirements.txt
30+
pip install pylint black isort
31+
32+
- name: Run Black (Code Formatting)
33+
run: black --check --line-length 100 .
34+
35+
- name: Run isort (Import Sorting)
36+
run: isort --check-only --profile black .
37+
38+
- name: Run Pylint
39+
run: |
40+
pylint --rcfile=.pylintrc **/*.py --exit-zero --output-format=text | tee pylint-report.txt
41+
score=$(tail -n 2 pylint-report.txt | grep -oP '\d+\.\d+(?=/10)')
42+
echo "Pylint Score: $score/10"
43+
if (( $(echo "$score < 8.0" | bc -l) )); then
44+
echo "Pylint score is below 8.0"
45+
exit 1
46+
fi
47+
48+
- name: Upload Lint Report
49+
uses: actions/upload-artifact@v4
50+
if: always()
51+
with:
52+
name: pylint-report
53+
path: pylint-report.txt

.gitignore

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# General information about gitignore:
2+
# https://github.com/github/gitignore/blob/main/Python.gitignore
3+
4+
# From this project
5+
*.pyc
6+
.DS_Store
7+
tests.py
8+
.md
9+
json_dir
10+
11+
# From gitignore suggestions
12+
__pycache__/
13+
*.py[cod]
14+
*$py.class
15+
16+
# Distribution / packaging
17+
.Python
18+
build/
19+
develop-eggs/
20+
dist/
21+
downloads/
22+
eggs/
23+
.eggs/
24+
lib/
25+
lib64/
26+
parts/
27+
sdist/
28+
var/
29+
wheels/
30+
share/python-wheels/
31+
*.egg-info/
32+
.installed.cfg
33+
*.egg
34+
MANIFEST
35+
36+
# Environments
37+
.env
38+
.venv
39+
env/
40+
venv/
41+
ENV/
42+
env.bak/
43+
venv.bak/
44+
45+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
46+
__pypackages__/

.pre-commit-config.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
repos:
2+
# Black - Code Formatting
3+
- repo: https://github.com/psf/black
4+
rev: 25.9.0
5+
hooks:
6+
- id: black
7+
language_version: python3.13
8+
args: [--line-length=100]
9+
10+
# isort - Import Sorting
11+
- repo: https://github.com/PyCQA/isort
12+
rev: 7.0.0
13+
hooks:
14+
- id: isort
15+
args: [--profile=black]
16+
17+
# Pylint - Code Quality
18+
- repo: https://github.com/pylint-dev/pylint
19+
rev: v4.0.2
20+
hooks:
21+
- id: pylint
22+
args: [--rcfile=.pylintrc, --exit-zero]
23+
additional_dependencies:
24+
- pylint

0 commit comments

Comments
 (0)